创建翻译
使用 CometAPI POST /v1/audio/translations 将语音音频翻译为英文文本。支持 Whisper 模型和多种输出格式。
首次请求
发送一个受支持的音频文件,并提供model 和 file。建议先使用一个较短的样本,以便验证上传处理、语言检测和输出解析。
读取响应
默认响应包含翻译后的英文text。如果你请求了不同的响应格式,请根据该格式解析响应。
后续步骤
授权
Bearer token authentication. Use your CometAPI key.
请求体
The audio file to translate. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.
The audio translation model to use. Choose a current speech model from the Models page.
Optional text to guide the model's style or continue a previous audio segment. The prompt should be in English.
The output format for the translation.
json, text, srt, verbose_json, vtt Sampling temperature between 0 and 1. Higher values produce more random output; lower values are more focused. When set to 0, the model auto-adjusts temperature using log probability.
0 <= x <= 1响应
The translation result in English.
The translated text in English.