Create translation
POSThttps:/api.openai.com/v1/audio/translations
Translates audio into English.
Request body
filestringRequired
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.modelstring
ID of the model to use. Only
whisper-1(which is powered by our open source Whisper V2 model) is currently available.modelstringRequired
modelstringRequired
whisper-1string
promptstring
An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English.
response_formatstringDefaults: json
The format of the output, in one of these options:
json,text,srt,verbose_json, orvtt.jsonstring
textstring
srtstring
verbose_jsonstring
vttstring
temperaturenumberDefaults: 0
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Response
The translated text.
Example request
1 curl https://api.openai.com/v1/audio/translations \2 -H "Authorization: Bearer $OPENAI_API_KEY" \3 -H "Content-Type: multipart/form-data" \4 -F file="@/path/to/file/german.m4a" \5 -F model="whisper-1"
Example response
1 {2 "text": "Hello, my name is Wolfgang and I come from Germany. Where are you heading today?"3 }
Built with