> ## 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.

# Gemini 2.5 Pro Preview TTS

> Gemini 2.5 Pro Preview TTS: テキスト読み上げモデル。MixRouteでのリクエスト例とパラメーター。

Gemini 2.5 Pro Preview TTSは、Googleのテキスト読み上げモデルです。

MixRouteのネイティブGeminiエンドポイントを通じて`gemini-2.5-pro-preview-tts`を呼び出してください。

## 主な機能

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

## 簡単な使用例

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/models/gemini-2.5-pro-preview-tts:generateContent" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "contents": [
        {
          "parts": [
            {
              "text": "Say clearly: Welcome to MixRoute."
            }
          ]
        }
      ],
      "generationConfig": {
        "responseModalities": [
          "AUDIO"
        ],
        "speechConfig": {
          "voiceConfig": {
            "prebuiltVoiceConfig": {
              "voiceName": "Kore"
            }
          }
        }
      }
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/models/gemini-2.5-pro-preview-tts:generateContent",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'contents': [{'parts': [{'text': 'Say clearly: Welcome to MixRoute.'}]}],
              'generationConfig': {'responseModalities': ['AUDIO'],
                                   'speechConfig': {'voiceConfig': {'prebuiltVoiceConfig': {'voiceName': 'Kore'}}}}},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

## パラメータ

| パラメーター | 型 | 必須 | 説明 |
| - | - | - | - |
| `contents` | array | はい | 読み上げるテキストコンテンツ。 |
| `generationConfig.responseModalities` | array | はい | AUDIOに設定してください。 |
| `generationConfig.speechConfig` | object | はい | 音声の設定。 |


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