synthesize
Convert written text into MP3 audio files for listening or language practice. Pick from multiple voices, languages, and speech rates to match your needs.
Instructions
Synthesize text to an MP3 audio file.
Args: text: The text to convert to speech. With ElevenLabs eleven_v3, you can embed audio tags in square brackets anywhere in the text to control delivery — e.g. [tired], [excited], [whisper], [sad], [sigh], [laughs], [dramatic tone]. Tags are free-form; the model interprets them as performance cues. Combine with punctuation (ellipsis for pauses, ! for emphasis) for best results. Tags only work with ElevenLabs eleven_v3 model. voice: Voice name. Default: provider's default voice (currently matilda for ElevenLabs, joanna for Polly, nova for OpenAI). If language is provided without voice, a suitable default voice for that language is selected automatically. language: ISO 639-1 language code (e.g. 'de', 'ko', 'fr'). Enables language-aware voice selection and validation. With Polly, validates voice-language compatibility. With ElevenLabs/OpenAI, passed through (voices are multilingual). rate: Speech rate as percentage (90 = 90% speed, good for language learners). Defaults to 90. ElevenLabs ignores rate; use audio tags like [rushed] or [drawn out] instead. auto_play: Open the file in the default audio player after synthesis. Defaults to true. output_path: Full path for the output file. If not provided, a file is auto-generated in output_dir. output_dir: Directory for output. Defaults to TTS_OUTPUT_DIR env var or ~/langlearn-audio/. stability: ElevenLabs voice stability (0.0-1.0). Ignored by other providers. Defaults to provider default. similarity: ElevenLabs voice similarity boost (0.0-1.0). Ignored by other providers. Defaults to provider default. style: ElevenLabs voice style/expressiveness (0.0-1.0). Ignored by other providers. Defaults to provider default. speaker_boost: ElevenLabs speaker boost toggle. Ignored by other providers. Defaults to provider default.
Returns: JSON string with path, text, voice, and language fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate | No | ||
| text | Yes | ||
| style | No | ||
| voice | No | ||
| language | No | ||
| auto_play | No | ||
| stability | No | ||
| output_dir | No | ||
| similarity | No | ||
| output_path | No | ||
| speaker_boost | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |