切换主题
音频转录
将音频转换为文本
音频转录
POST /v1/audio/transcriptions
将音频转换为文本
认证
BearerAuth
请求体
必填:是
multipart/form-data
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| file | 是 | string | 音频文件 |
| model | 是 | string | Examples: whisper-1 |
| language | 否 | string | ISO-639-1 语言代码 |
| prompt | 否 | string | - |
| response_format | 否 | enum: json | text | srt | verbose_json | vtt | Default: json |
| temperature | 否 | number | - |
| timestamp_granularities | 否 | array<enum: word | segment> | - |
原始 Schema
json
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "音频文件"
},
"model": {
"type": "string",
"examples": [
"whisper-1"
]
},
"language": {
"type": "string",
"description": "ISO-639-1 语言代码"
},
"prompt": {
"type": "string"
},
"response_format": {
"type": "string",
"enum": [
"json",
"text",
"srt",
"verbose_json",
"vtt"
],
"default": "json"
},
"temperature": {
"type": "number"
},
"timestamp_granularities": {
"type": "array",
"items": {
"type": "string",
"enum": [
"word",
"segment"
]
}
}
},
"required": [
"file",
"model"
]
}响应
200 成功转录
application/json
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| text | 否 | string | - |
原始 Schema
json
{
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"x-apifox-orders": [
"text"
]
}