TsgcAIOpenAITranslatorMethods › Start

Start Method

Starts capturing audio from the assigned recorder so the user can speak the phrase to translate.

Syntax

procedure Start;

Remarks

Invokes AudioRecorder.Start and fires OnAudioStart as soon as the recorder begins capturing. The AudioRecorder property must be assigned before calling Start; otherwise an access violation is raised. After the recorder stops, the translator automatically uploads the recorded file to the Whisper API, translates the text, and — if a TextToSpeech component is assigned and the returned text is not empty — plays the translation back. When the recorder is configured with RecorderOptions.Mode = camoAuto, Start is also invoked internally after the text-to-speech playback finishes, allowing a continuous voice conversation loop.

Example

sgcTranslator.AudioRecorder := sgcAudioRecorder;
sgcTranslator.TextToSpeech := sgcTextToSpeech;
sgcTranslator.Start;
// ... the user speaks now; call Stop to trigger the translation

Back to Methods