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

# GPT-4o Transcribe Diarize

> GPT-4o Transcribe Diarize：支持说话人分离的语音转录模型。包含 MixRoute 调用示例与参数。

GPT-4o Transcribe Diarize 是 OpenAI 推出的支持说话人分离的语音转录模型。

可使用下方端点通过 MixRoute 调用 `gpt-4o-transcribe-diarize`。

## 核心能力

* 语音转文本 - 转录上传的音频文件
* 文件上传 - 通过 multipart form data 发送音频
* 输出格式 - 支持模型对应的响应格式
* 说话人分离 - 标注每个片段的说话人
* 片段时间戳 - 返回每次发言的开始与结束时间

## 快速示例

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/audio/transcriptions" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -F "file=@speech.wav" \
      -F "model=gpt-4o-transcribe-diarize" \
      -F "response_format=diarized_json" \
      -F "chunking_strategy=auto"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    with open("speech.wav", "rb") as audio_file:
        transcript = client.audio.transcriptions.create(
            model="gpt-4o-transcribe-diarize",
            file=audio_file,
            response_format="diarized_json",
            chunking_strategy="auto",
        )

    print(transcript)
    ```
  </Tab>
</Tabs>

## 参数

| 参数                  | 类型               | 必填 | 说明                               |
| ------------------- | ---------------- | -- | -------------------------------- |
| `file`              | file             | 是  | 通过 multipart form data 上传的音频文件。  |
| `model`             | string           | 是  | 固定为 `gpt-4o-transcribe-diarize`。 |
| `language`          | string           | 否  | 模型支持时指定输入语言代码。                   |
| `prompt`            | string           | 否  | 用于引导转录的可选文本。                     |
| `response_format`   | string           | 是  | 设为 diarized\_json 以返回带说话人标签的片段。  |
| `chunking_strategy` | string \| object | 否  | 使用 auto 或提供自定义音频分块策略。            |
