curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'language=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123{
"language": "<string>",
"duration": 123,
"text": "<string>",
"words": [
{
"word": "<string>",
"start": 123,
"end": 123
}
],
"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
}
],
"usage": {
"type": "<string>",
"seconds": 123
}
}将音频转写为文本。
使用 OpenAI 的 Whisper 模型对音频文件进行转写。支持多种音频格式, 包括 mp3、mp4、mpeg、mpga、m4a、wav 和 webm。单个文件最大为 25 MB。
参数: file:要转写的音频文件(必填) model:要使用的模型 id(例如:“openai/whisper-1”) language:ISO-639-1 语言代码(例如:“en”、“es”),有助于提升识别准确率 prompt:可选文本,用于引导模型的风格 response_format:响应格式(json、text、srt、verbose_json、vtt) temperature:采样温度,取值范围为 0 到 1
返回: 一个包含转写文本的转写对象(Transcription object)
curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'language=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123{
"language": "<string>",
"duration": 123,
"text": "<string>",
"words": [
{
"word": "<string>",
"start": 123,
"end": 123
}
],
"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
}
],
"usage": {
"type": "<string>",
"seconds": 123
}
}使用 Bearer 令牌的 API 密钥身份验证
成功的响应
表示基于提供的输入,由模型返回的详细 JSON 转录响应。
字段:
此页面对您有帮助吗?