AI Translator
Translate text between languages using AI models. Supports multiple LLM backends including OpenAI, Anthropic, and local models.
Translate text between languages using AI models. Supports multiple LLM backends including OpenAI, Anthropic, and local models.
Speech-in, speech-out translator. Captures audio, sends it to Whisper translation, speaks the English result through a TTS provider.
TsgcAIOpenAITranslator
Voice front-end on top of OpenAI Whisper translation
Windows, macOS, Linux, iOS, Android
Enterprise (AI add-on)
Plug an AudioRecorder + TextToSpeech, set the API key, call Start to capture and Stop to translate.
uses
sgcAI, sgcAI_OpenAI, sgcAI_OpenAI_Audio_Translator,
sgcAI_AudioRecorder_MCI, sgcAI_TextToSpeech_System;
var
Translator: TsgcAIOpenAITranslator;
begin
Translator := TsgcAIOpenAITranslator.Create(nil);
Translator.OpenAIOptions.ApiKey := 'sk-...';
Translator.AudioRecorder := TsgcAudioRecorderMCI.Create(nil);
Translator.TextToSpeech := TsgcTextToSpeechSystem.Create(nil);
Translator.OnAudioStart := TranslatorAudioStart;
Translator.OnAudioStop := TranslatorAudioStop;
Translator.OnTranslation := TranslatorTranslation;
// Press to speak in any language; the audio is sent to Whisper,
// translated to English, then spoken back through TTS.
Translator.Start;
end;
5 published properties, 2 methods, 3 events — pulled from the component reference.
Published properties: OpenAIOptions, TranslatorOptions.
Published properties: Version.
Properties: TextToSpeech, AudioRecorder.
Methods: Start, Stop.
Events: OnTranslation.
Authoritative sources for the protocols this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcAIOpenAITranslator Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\AI\Translator Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |