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.
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). |
Input Schema (JSON Schema)
{
"properties": {
"input": {
"description": "The text to synthesize into speech.",
"type": "string"
},
"model": {
"default": "tts-1",
"description": "The TTS model to use.",
"enum": [
"tts-1",
"tts-1-hd"
],
"type": "string"
},
"play": {
"default": false,
"description": "Whether to automatically play the generated audio file.",
"type": "boolean"
},
"response_format": {
"default": "mp3",
"description": "The format of the audio response.",
"enum": [
"mp3",
"opus",
"aac",
"flac"
],
"type": "string"
},
"voice": {
"description": "Optional: The voice to use. Overrides the configured default (alloy).",
"enum": [
"alloy",
"echo",
"fable",
"onyx",
"nova",
"shimmer"
],
"type": "string"
}
},
"required": [
"input"
],
"type": "object"
}