text_to_speech
Convert written text into spoken audio files. Tries Groq's free PlayAI service first, then falls back to a fully local model, saving MP3 or WAV output to the output/ directory.
Instructions
Convert text to speech, saved to output/.
Tries Groq's playai-tts first (free tier, no credit card - requires
GROQ_API_KEY), falling back to a fully local, keyless model (Kokoro-82M,
Apache-2.0) if Groq is unavailable or the key isn't set. The local
fallback always produces a .wav file regardless of output_format
(Kokoro's native output), and requires the optional local-tts extra
(uv sync --extra local-tts) plus the espeak-ng system package for
full quality on non-trivial or non-English text.
Args: text: Text to speak. voice: Groq PlayAI voice name (e.g. "Fritz-PlayAI") - ignored by the local fallback, which always uses Kokoro's "af_heart" voice. output_format: "mp3" or "wav". Only honored on the Groq tier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| voice | No | Fritz-PlayAI | |
| output_format | No | mp3 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |