Delphi AI 翻訳コンポーネント
AI モデルを使用して言語間のテキスト翻訳を行います。OpenAI、Anthropic、ローカルモデルなど複数の LLM バックエンドに対応しています。
AI モデルを使用して言語間のテキスト翻訳を行います。OpenAI、Anthropic、ローカルモデルなど複数の LLM バックエンドに対応しています。
音声入力・音声出力のトランスレーターです。音声をキャプチャし、gpt-transcribe で文字起こしし、チャットモデルでテキストを Language(既定は英語)に翻訳して、TTS プロバイダー経由で結果を読み上げます。
TsgcAIOpenAITranslator
OpenAI の文字起こしとチャット翻訳の上に構築された音声フロントエンド
Windows, macOS, Linux, iOS, Android
Enterprise (AI アドオン)
AudioRecorder と TextToSpeech を設定し、API キーを設定してから Start で録音開始、Stop で翻訳を実行します。
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 個、メソッド 2 個、イベント 3 個 — コンポーネントリファレンスから取得。
Published プロパティ: OpenAIOptions, TranslatorOptions.
Published プロパティ: Version.
プロパティ: TextToSpeech, AudioRecorder.
メソッド: Start, Stop.
イベント: OnTranslation。
whisper-1 の廃止。OpenAI は 2027-02-26 に /v1/audio/translations エンドポイントと whisper-1 を廃止します。トランスレーターは TranslatorOptions.Translation.Model で文字起こしし、Translation.ChatModel で Translation.Language に翻訳するようになったため、その日以降も動作し続けます。リアルタイムの音声翻訳には TsgcAIVoiceTranslator を使ってください。
本コンポーネントが実装するプロトコルの正式な情報源です。
コンポーネントリファレンスへのディープリンク、すぐに実行できるデモプロジェクト、体験版のダウンロードをご利用ください。
| オンラインヘルプ — TsgcAIOpenAITranslator 本コンポーネントのプロパティ、メソッド、イベントの完全なリファレンスです。 | Open | |
| デモプロジェクト — Demos\AI\Translator すぐに実行できるサンプルプロジェクトです。sgcWebSockets パッケージに同梱されています — 下のリンクから体験版をダウンロードしてください。 | Open | |
| 技術ドキュメント (PDF) 機能、クイックスタート、Delphi および C++ Builder のコードサンプルと一次情報源リファレンス — 本コンポーネントのみ。 | Open | |
| ユーザーマニュアル (PDF) ライブラリ内のすべてのコンポーネントを網羅した包括的なマニュアルです。 | 開く |