TsgcTextToSpeechAmazon › Methods › TextToSpeech
Sends the text to Amazon Polly and stores the synthesized audio in AmazonOptions.FileName.
void __fastcall TextToSpeech(const UnicodeString aText);
| Name | Type | Description |
|---|---|---|
aText | const string | Text to be converted to speech. Interpreted as plain text or SSML depending on AmazonOptions.TextType. |
Builds a Polly synthesize request using the values configured in AmazonOptions, signs it with the AWS credentials, writes the returned audio to AmazonOptions.FileName and - if an AudioPlayer is assigned - plays the file. The generated file is deleted after playback so that each call starts from a clean state.