text_to_speech
Convert text into spoken audio using OpenAI's TTS technology, with options for different voices, models, and audio formats. The generated audio can be saved to a file and optionally played automatically.
Instructions
Converts text into spoken audio using OpenAI TTS (default voice: alloy), saves it to a file, and optionally plays it.
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 | The text to synthesize into speech. | |
| model | No | The TTS model to use. | tts-1 |
| play | No | Whether to automatically play the generated audio file. | |
| response_format | No | The format of the audio response. | mp3 |
| voice | No | Optional: The voice to use. Overrides the configured default (alloy). |