音频转写
音频转文本,支持开发者上传音频文件,获取音频文件对应的文本内容。
请求地址
POST https://api.stepfun.com/v1/audio/transcriptions
请求参数
-
modelstringrequired
需要使用的模型名称,固定为step-asr -
response_formatstringrequired
输出的文件格式。 - 支持json、text、srt、vtt -
fileFilerequired
音频文件- 支持格式: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav,webm,aac,opus
- 文件大小限制:小于 100MB
- 支持格式: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav,webm,aac,opus
-
hotwordsstringoptional
热词列表,JSON String 格式,需要为可解析的 JSON List。如["1","2","3","4","abc"]
请求响应
根据 response_format,返回对应格式的内容
textstring
识别所得文字
{ "text": "测试录制音频" }示例
curl -L 'https://api.stepfun.com/v1/audio/transcriptions' \
-H "Authorization: Bearer $STEP_API_KEY" \
-F 'model="step-asr"' \
-F 'response_format="json"' \
-F 'file=@"sample.mp3"'Last updated on