Text-to-speech: Orpheus and Gemini TTS for a support line
Notebook· 13.03· 2 h· Lesson 112 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Rewrite a chat answer so it can be spoken: no Markdown or URLs, IDs spelled out, currencies said aloud.
- Split text into Orpheus's 200-character requests at sentence boundaries, with the vocal direction on every chunk.
- Guard a TTS quota before sending (Orpheus free tier: 100 requests and 3.6K tokens a day).
- Synthesize the same answer with Groq Orpheus and Gemini TTS, and compare time to first audio, total time, languages and cost.
- Check generated speech automatically by transcribing it back with Whisper.
- Build a fallback chain with a cache that always ends in a text answer.
Before you start
Lesson 13.02 (audio basics, Whisper). Read the module README first.
