TsgcAIOpenAIChatBotProperties › TextToSpeech

TextToSpeech Property

Component used to speak the assistant reply (System, Google or Amazon TTS).

Syntax

property TextToSpeech: TsgcTextToSpeech read FTextToSpeech write SetTextToSpeech;

Default Value

Remarks

Assign any descendant of TsgcTextToSpeech: TsgcTextToSpeechSystem (Windows SAPI), TsgcTextToSpeechGoogle, or TsgcTextToSpeechAmazon. The ChatBot wires up the OnStart/OnStop events automatically and, when AudioRecorder.RecorderOptions.Mode = camoAuto, restarts recording after playback ends so the user can reply. If TextToSpeech is nil the reply is emitted only via OnChatCompletion.

Example

sgcTextToSpeech := TsgcTextToSpeechSystem.Create(Self);
sgcChatBot.TextToSpeech := sgcTextToSpeech;

Back to Properties