> ## 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 或提供自訂音訊分塊策略。             |
