> ## Documentation Index
> Fetch the complete documentation index at: https://platform.stepfun.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 音频转写

将上传的音频文件识别为文本，一次性返回完整结果，适合简单的整段转写场景。推荐使用模型 `stepaudio-2.5-asr`。

> [!NOTE]
>
> 如需分句与字 / 词级时间戳、双声道分轨、说话人识别等进阶能力，请使用 [音频文件识别](https://platform.stepfun.com/docs/zh/api-reference/audio/asr.md)。

## 请求地址

`POST https://api.stepfun.com/v1/audio/transcriptions`

请求体为 `multipart/form-data`。

## 请求参数

* `model` `string` ***required***\
  模型名称，支持 `stepaudio-2.5-asr`、`step-asr`（旧模型名称）。
* `response_format` `string` ***required***\
  输出格式，支持 `json`、`text`。
* `file` `File` ***required***\
  待识别的音频文件，支持 `mp3`、`pcm`、`ogg`、`wav`，文件需小于 100MB。
* `hotwords` `string` ***optional***\
  热词列表，为可解析的 JSON 数组字符串，如 `["热词1", "热词2"]`。

## 返回

接口根据 `response_format` 返回对应格式的识别结果。

> [tab] json
>
> * `text` `string`\
>   识别所得的完整文本。
>
> ```json theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
> { "text": "测试录制音频" }
> ```

> [tab] text
>
> ```text theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
> 测试录制音频
> ```

## 示例

> [tab] curl
>
> ```bash theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
> curl -L 'https://api.stepfun.com/v1/audio/transcriptions' \
>   -H "Authorization: Bearer $STEPFUN_API_KEY" \
>   -F 'model="stepaudio-2.5-asr"' \
>   -F 'response_format="json"' \
>   -F 'file=@"sample.mp3"'
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.