gemini-2.5-pro-preview-ttsを呼び出してください。
主な機能
- 音声合成 - テキストを生成音声に変換
- 音声の選択 - プリセットの音声を設定
- 音声出力 - 生成した音声データを返す
簡単な使用例
- cURL
- Python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Gemini 2.5 Pro Preview TTS: テキスト読み上げモデル。MixRouteでのリクエスト例とパラメーター。
gemini-2.5-pro-preview-ttsを呼び出してください。
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"
}
}
}
}
}'
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())
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
contents | array | はい | 読み上げるテキストコンテンツ。 |
generationConfig.responseModalities | array | はい | AUDIOに設定してください。 |
generationConfig.speechConfig | object | はい | 音声の設定。 |