TsgcTextToSpeechSystemMethods › TextToSpeech

TextToSpeech Method

Speaks the supplied text using the Windows SAPI voice engine (SpVoice) via OLE automation.

Syntax

void __fastcall TextToSpeech(const UnicodeString aText);

Parameters

NameTypeDescription
aTextconst stringText to be spoken through the default Windows SAPI voice.

Remarks

Creates a SAPI.SpVoice OLE object and calls its Speak method to output the text through the system's default voice and audio device. No API keys or network access are required. OnStart is fired before playback begins and OnStop when it ends. Available on Windows only.

Example

Back to Methods