text_to_speech
Convert text into spoken audio and save it as a file. Choose AI voice, language, speed, and format to generate speech on demand.
Instructions
Convert text to speech audio using Smallest AI's Lightning TTS. Saves the audio file to the specified path. IMPORTANT: Always ask the user where to save the file before calling. Suggest ~/Desktop/.wav as default. Do NOT retry if successful — the file is saved even if inline audio rendering fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to synthesize into speech | |
| model | No | TTS model. lightning_v3.1 (default) or lightning_v3.1_pro (Lightning V3.1 Pro — higher quality, curated voices). Default: lightning_v3.1 | lightning_v3.1 |
| speed | No | Speech speed multiplier (0.5-2.0). Default: 1.0 | |
| language | No | Language code (e.g. en, hi, ta, es). Default: en. | en |
| voice_id | No | Voice ID to use (e.g. emily, daniel, rachel, yuvika). Use get_voices to see available voices. | emily |
| output_path | Yes | File path to save the audio to (e.g. ~/Desktop/output.wav). Ask the user where to save. | |
| sample_rate | No | Audio sample rate in Hz (8000, 16000, 24000, 44100). Default: 24000 | |
| output_format | No | Output audio format. Default: wav | wav |