Heya, folks! I’m excited to present Talk To Me Goose, a project designed to improve the way your Home Assistant Voice Preview Edtion (HAVPE) devices handle long responses from LLMs (Large Language Models) by streaming their responses into your TTS engine of choice in real time.
Do your HAVPE devices sometimes fail to respond, and then work just fine with the next command? Have you tried asking your HAVPE device to tell you a story, only for it to fail silently? Have you already managed to increase HAVPE’s timeout, but now you need to wait like 15 seconds to hear a long response? Then this solution is for you!
The Problem:
HAVPE devices often struggle to handle long responses. For instance, when you ask an LLM for something like a story, it can take too long to generate the response, leading to timeouts in the device (e.g., “Connection timed out before data was ready!”). Even with a longer timeout, you can still face frustrating delays as the response has to be fully generated before it gets played.
The Solution:
Talk To Me Goose solves this problem by streaming the LLM’s response directly into your TTS engine, ensuring near-instant audio output. As the LLM generates its response, the text is streamed token-by-token, and as soon as a sentence is complete, it’s passed to the TTS engine. This means you’ll hear the response in just a few seconds, even if it’s a long one!
Additionally, just like the original OpenAI integration, Talk To Me Goose can handle tool calls and commands like “set a timer for X minutes” seamlessly, delivering both the LLM’s output and relevant commands with no delays.
Key Features:
- Real-time streaming of LLM responses into your TTS engine.
- As native as it gets: handles commands like “set a timer”, other tool calls and message history.
- Supports multiple TTS engines.
- Easy to set up with Home Assistant and HAVPE devices.
- Works with multiple HAVPE devices.
The Solution Includes:
- TTMG Server – The core of the system, facilitating the real-time streaming from the LLM to the TTS engine, re-encoding the audio into flac and streaming it to your HAVPE devices.
- TTMG Conversation: Home Assistant integration for sending requests to the LLM and managing conversations.
- Patches to the HAVPE official firmware to make it work with the TTMG Server.
This system enables smooth integration between Home Assistant, HAVPE devices and your LLM/TTS setup, ensuring fast and uninterrupted voice responses.
Supported LLMs and TTS Engines:
LLMs:
- OpenAI (e.g., GPT-3, GPT-4)
TTS Engines:
- OpenAI
- Google Cloud
- ElevenLabs
- Wyoming-piper
Getting Started:
Visit the full README for detailed installation instructions, limitations, configuration examples, flows/endpoints description, etc.