Skip to content

音频转录

音频转录

POST /v1/audio/transcriptions

将音频转换为文本

请求头 (Headers)

参数名类型必选描述示例
Authorizationstring鉴权令牌Bearer ********************

请求体 (Request Body)

Content-Type: multipart/form-data

字段类型必选描述
filestring音频文件
modelstring
languagestringISO-639-1 语言代码
promptstring
response_formatstring
temperaturenumber
timestamp_granularitiesarray of string

请求体示例

json
{
  "file": "string",
  "model": "whisper-1",
  "language": "string",
  "prompt": "string",
  "response_format": "json",
  "temperature": 0,
  "timestamp_granularities": [
    "string"
  ]
}

返回响应 (Responses)

200 - 成功转录

字段类型描述
textstring

响应示例

json
{
  "text": "string"
}

Released under the MIT License.