Source Code:
src/gaia/audio/Components: AudioClient, WhisperAsr, KokoroTTS
Module:
gaia.audio
Import:Overview
The audio subsystem provides complete voice interaction capabilities including Automatic Speech Recognition (ASR), Text-to-Speech (TTS), and voice chat orchestration. AudioClient coordinates ASR and TTS with LLM generation, while WhisperAsr handles voice-to-text transcription and KokoroTTS provides high-quality speech synthesis. Both models are served by Lemonade Server (/api/v1/audio/transcriptions and /api/v1/audio/speech); GAIA runs no speech model in-process.
Key Features:
- Voice chat with streaming TTS
- Whisper-based ASR with Voice Activity Detection (VAD)
- High-quality Kokoro TTS with multiple voices (17+ available)
- Streaming audio processing with real-time playback
- Interrupt handling (keyboard and voice)
- Models pulled through Lemonade on first use; Lemonade picks the device
- Thread-safe operation
Requirements
AudioClient
- Voice chat session management
- ASR/TTS coordination (pause recording during TTS)
- LLM integration for conversation
- Interrupt and halt handling
- Queue-based transcription delivery
WhisperAsr
- Real-time speech recognition: each utterance is transcribed by Lemonade’s Whisper
- Configurable model sizes (tiny, base, small, medium, large, turbo)
- Voice Activity Detection with silence thresholds
- Pause/resume recording capability
- A Lemonade failure stops recording and is reported on
asr_error
KokoroTTS
- High-quality speech synthesis via Lemonade’s
kokoro-v1model - Multiple voice options (American/British, male/female)
- Streaming audio generation
- Real-time playback
- Interrupt event handling
API Specification
AudioClient
WhisperAsr
KokoroTTS
Dependencies
Required Packages
kokoro-v1; both are pulled on first use.