gemini_generate_audio
Converts written text into spoken audio using Gemini TTS and saves it to a file, with optional voice selection and duration reporting.
Instructions
Read text aloud with Gemini TTS (google-genai SDK, API credit) and save it to output_path.
.wav is written directly; other extensions (.mp3, .m4a ...) are converted with ffmpeg when available, otherwise a .wav next to it is returned. Put only the words to be spoken in text: gemini-3.8-flash-tts reads directions such as "Say cheerfully:" aloud. Choose the tone with voice_name instead. Returns the saved path and the length in seconds; to check what was said, pass the file to gemini_analyze_media.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"output_path": "<output_path>"
},
"name": "gemini_generate_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| session_id | No | ||
| voice_name | No | Kore | |
| output_path | Yes |