client.generateTranslation().
例
主なパラメーター
model必須: 翻訳に対応したモデルのID。file必須: 翻訳する音声データ。prompt: 翻訳の参考にする任意のコンテキスト。temperature(0–2): サンプリングのランダム性。response_format:json,text,srt,verbose_json, など
戻り値
AudioTranscriptionResponse
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
TypeScript SDKで /audio/translations を呼び出します。
client.generateTranslation().
const translated = await client.generateTranslation({
model: "openai/gpt-4o-translate",
file: "data:audio/mp3;base64,...",
});
model 必須: 翻訳に対応したモデルのID。file 必須: 翻訳する音声データ。prompt: 翻訳の参考にする任意のコンテキスト。temperature (0–2): サンプリングのランダム性。response_format: json, text, srt, verbose_json, などAudioTranscriptionResponse
{
"text": "Hello world"
}