Delphi AI Translator

Translate text between languages using AI models. Supports multiple LLM backends including OpenAI, Anthropic, and local models.

TsgcAIOpenAITranslator

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.

Component class

TsgcAIOpenAITranslator

Protocol

Voice front end on top of OpenAI transcription plus chat translation

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Enterprise / sgcAI

Drop the component, set a few properties, go

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;

What's inside

5 published properties, 2 methods, 3 events — pulled from the component reference.

Configuration

Published properties: OpenAIOptions, TranslatorOptions.

Diagnostics

Published properties: Version.

Audio

Properties: TextToSpeech, AudioRecorder.

Session

Methods: Start, Stop.

Translation

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.

Specifications & references

Authoritative sources for the protocols this component implements.

Documentation & Demos

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.
Demo Project — Demos\AI\Translator Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Ready to Translate with AI?

Download the free trial and start building in minutes.