text_to_speech
Convert text into speech audio using OpenRouter TTS models and save the result as a file. Choose a voice, model, speed, and output format to generate spoken audio.
Instructions
Convert text to speech audio via OpenRouter TTS models (OpenAI, Mistral Voxtral, Fish Audio, Microsoft MAI-Voice). Saves audio file.
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": {
"input": "<input>"
},
"name": "text_to_speech"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Text to convert to speech | |
| model | No | TTS model (default: openai/gpt-4o-mini-tts) | |
| speed | No | Playback speed multiplier (OpenAI models only) | |
| voice | No | Voice ID, e.g. alloy, nova, shimmer, echo, onyx, coral, ash, sage, fable | |
| output_dir | No | Save directory (default: ./generated) | |
| response_format | No | Audio format (default: mp3) |