TsgcTextToSpeechGoogle › Methods › TextToSpeech
Sends the text to Google Cloud Text-To-Speech and stores the synthesized audio in GoogleOptions.FileName.
void __fastcall TextToSpeech(const UnicodeString aText);
| Name | Type | Description |
|---|---|---|
aText | const string | Text to be synthesized. Sent as the input.text field of the Google Cloud request. |
Builds a Google Cloud text:synthesize request using GoogleOptions, obtains a Bearer token through the service-account JWT defined by GoogleOptions.Settings, base64-decodes the audioContent returned by Google into GoogleOptions.FileName and - if an AudioPlayer is assigned - plays the file. The file is deleted after playback.