> ## 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 Mini TTS

> GPT-4o Mini TTS: テキスト読み上げモデル。MixRouteでのリクエスト例とパラメーター。

GPT-4o Mini TTSは、OpenAIのテキスト読み上げモデルです。

以下のエンドポイントを使用し、MixRouteを通じて`gpt-4o-mini-tts`を呼び出します。

## 主な機能

* 音声合成 - テキストを生成音声に変換
* 音声の選択 - プリセットの音声を設定
* 音声出力 - 生成した音声データを返す

## 簡単な使用例

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/audio/speech" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "gpt-4o-mini-tts",
      "voice": "alloy",
      "input": "Welcome to MixRoute.",
      "response_format": "wav"
    }' \
      --output speech.wav
    ```
  </Tab>

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

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

    with client.audio.speech.with_streaming_response.create(
        model="gpt-4o-mini-tts",
        voice="alloy",
        input="Welcome to MixRoute.",
        response_format="wav",
    ) as response:
        response.stream_to_file(Path("speech.wav"))
    ```
  </Tab>
</Tabs>

## パラメータ

| パラメーター | 型 | 必須 | 説明 |
| - | - | - | - |
| `model` | string | はい | `gpt-4o-mini-tts`である必要があります。 |
| `input` | string | はい | 音声合成するテキスト。 |
| `voice` | string | はい | 音声生成に使用する声。 |
| `response_format` | string | いいえ | 音声の出力形式。 |


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