飞桥数智云/文档

音频转文字

通过 multipart 表单上传音频文件并指定转写模型。当前示例使用 qwen3-asr,并请求词级和片段级时间戳。支持 FLAC、MP3、MP4、MPEG、M4A、OGG、WAV 和 WebM。

接口

POST https://api.feiqiao.ai/v1/audio/transcriptions

使用 Authorization: Bearer $FEIQIAO_API_KEY 请求头进行认证。

主要参数

  • file:待转写音频文件,必填。
  • model:转写模型 ID,必填;当前示例为 qwen3-asr。
  • timestamp_granularities:可选的时间戳粒度,逗号分隔,例如 word,segment。
  • prompt:可选的转写提示。
  • response_format:可选的返回格式。

请求示例

curl https://api.feiqiao.ai/v1/audio/transcriptions   -H "Authorization: Bearer $FEIQIAO_API_KEY"   -F "model=qwen3-asr"   -F "timestamp_granularities=word,segment"   -F "file=@test.wav" | jq

响应示例

{
  "text": "Testing one two three. This is a short audio transcription test.",
  "usage": {
    "input_token_details": null,
    "input_tokens": null,
    "output_tokens": null,
    "seconds": 5.0,
    "total_tokens": null,
    "type": "duration"
  }
}

示例请求和完整参数见模型 API 总览。请确认所选模型支持该接口。