Translations(Speech to English Text whisper-1)
POST
/audio/translationsOpenAI Guide
OpenAI API Reference
Translate audio into English.
The Translation API accepts audio files in any supported language as input and, if necessary, transcribes the audio into English. This differs from our /Transcriptions endpoint because the output is not in the original input language but is instead translated into English text.
Price: 0.003 PTC / min
请求参数
API Key from 302.AI backend
The audio file to be translated. Use one of the following formats: mp3, mp4, mpeg, mpga, m4a, wav or webm.
The ID of the model to use. Only whisper-1
is currently available.
Optional text; to guide the model's style or continue a previous audio segment. Prompt should be in English.
The format of the transcript output. Choose from: json, text, srt, verbose_json, or vtt.
The sampling temperature ranges from 0 to 1. Higher values (e.g., 0.8) increase randomness in the output, while lower values (e.g., 0.2) make it more focused and deterministic. If set to 0, the model uses log probability to automatically adjust the temperature until specific thresholds are reached.
示例代码
Responses
{
"text": "Hello, my name is Wolfgang and I come from Germany. Where are you heading today?"
}