curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123{
"language": "<string>",
"duration": 123,
"text": "<string>",
"segments": [
{
"id": 123,
"seek": 123,
"start": 123,
"end": 123,
"text": "<string>",
"tokens": [
123
],
"temperature": 123,
"avg_logprob": 123,
"compression_ratio": 123,
"no_speech_prob": 123
}
]
}将音频翻译成英文。
使用 OpenAI 的 Whisper 模型,将任意受支持语言的音频文件翻译为英文文本。支持与转写功能相同的音频格式,单个文件最大 25 MB。
参数: file:待翻译的音频文件(必填) model:要使用的模型 id(例如:“openai/whisper-1”) prompt:可选文本,用于引导模型的输出风格 response_format:输出格式(json、text、srt、verbose_json、vtt) temperature:采样温度,取值范围为 0 到 1
返回: 包含英文翻译结果的 Translation 对象
curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123{
"language": "<string>",
"duration": 123,
"text": "<string>",
"segments": [
{
"id": 123,
"seek": 123,
"start": 123,
"end": 123,
"text": "<string>",
"tokens": [
123
],
"temperature": 123,
"avg_logprob": 123,
"compression_ratio": 123,
"no_speech_prob": 123
}
]
}使用 Bearer 令牌的 API 密钥身份验证
成功响应
字段:
此页面对您有帮助吗?