音频转文本
POST
https://api.deerapi.com/v1/audio/transcriptions
请求正文参数
prompt
(文本): 可选文本,用于引导模型的风格或延续之前的音频片段。提示语应与音频语言相匹配。response_format
(文本):输出格式,可选 json、text、srt、verbose_json 或 vtt。temperature
(文本):取样温度,介于 0 和 1 之间。取值越高(如 0.8),输出越随机,取值越低(如 0.2),输出越集中、确定。如果设置为 0,模型将使用对数概率自动提高温度,直到达到特定阈值。请求示 例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.deerapi.com/v1/audio/transcriptions' \
--header 'Authorization: Bearer {{api-key}}' \
--form 'file=@""' \
--form 'model="whisper-1"' \
--form 'prompt="eiusmod nulla"' \
--form 'response_format="json"' \
--form 'temperature="0"' \
--form 'language=""'
响应示例响应示例
{
"text": "Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that."
}
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer {{api-key}}
Body 参数multipart/form-data
file
file
必需
model
string
必需
示例值:
whisper-1
prompt
string
可选
示例值:
eiusmod nulla
response_format
string
可选
示例值:
json
temperature
string
可选
示例值:
0
language
string
可选
返回响应
修改于 2025-04-02 04:55:54