Delphi 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, transcribes it with gpt-transcribe, translates the text with a chat model into Language (English by default) and speaks the result through a TTS provider.
TsgcAIOpenAITranslator
Voice front end on top of OpenAI transcription plus chat translation
Windows, macOS, Linux, iOS, Android
Enterprise / sgcAI
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;
Translator.TranslatorOptions.Translation.Model := 'gpt-transcribe';
Translator.TranslatorOptions.Translation.ChatModel := 'gpt-6-luna';
Translator.TranslatorOptions.Translation.Language := 'English';
// Speak in any language: the audio is transcribed, the text is
// translated into Language, 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.
whisper-1 retirement. OpenAI removes the /v1/audio/translations endpoint and whisper-1 on 2027-02-26. The translator now transcribes with TranslatorOptions.Translation.Model and translates with Translation.ChatModel into Translation.Language, so it keeps working after that date. For realtime speech to speech translation use TsgcAIVoiceTranslator.
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 |