Repository navigation
Open
Labels
agentaudioAudio (ASR/TTS) changesconsumerBlocks consumer adoption — must ship for the v0.20.0 consumer launch windowdomain:agent-coreFramework, tools, registry, memory, skills, orchestrationenhancementNew feature or requestp2low priorityspec-readyIssue has implementation spec adequate for coding-agent assignmenttalkTalk agent changestrack:consumer-appConsumer product track — mobile-first: voice + messaging + memory + skills
Milestone
Description
Summary
Voice is a P0 enabling technology, not a nice-to-have. A privacy-first desktop assistant that can't talk is incomplete. Users interact primarily via voice at home and text on the road — both must deliver the same experience.
Strategic Context
Power users of local AI assistants report voice as their primary interaction mode at home (~50%+ of interactions). Voice-first is also the key differentiator vs cloud assistants — local ASR + TTS means voice data never leaves the device.
GAIA already has the building blocks: Whisper ASR (src/gaia/audio/whisper_asr.py), Kokoro TTS (src/gaia/audio/kokoro_tts.py), and Talk mode (gaia talk). The gap is integrating these into the Agent UI as a first-class interaction mode with parity to text.
Design Principle: Voice/Text Parity
- Same capabilities available in both modes
- Voice input → same processing pipeline as text input
- Responses delivered as both text (in UI) and speech (via TTS)
- Push-to-talk and always-listening modes
- Voice commands for smart home, email triage, daily briefs, system control
Key Deliverables
- Agent UI voice mode — mic button in chat, push-to-talk, streaming transcription displayed as it's spoken
- TTS response playback — agent reads responses aloud, interruptible
- Voice command routing — "hey GAIA" wake word (optional), direct command parsing
- Streaming ASR in UI — real-time transcription via Lemonade WebSocket (Add streaming transcription via Lemonade WebSocket realtime API #372)
- Voice + tool execution — voice triggers tools, results spoken back with summaries
- Smart home voice control — natural multi-device commands via Home Assistant integration
Dependencies
- Add streaming transcription via Lemonade WebSocket realtime API #372 (streaming ASR via Lemonade WebSocket)
- Add server-side TTS via Lemonade audio/speech endpoint #373 (server-side TTS via Lemonade audio/speech endpoint)
- Extend TalkSDK and AudioClient with Lemonade ASR+TTS auto-detection #386 (TalkSDK auto-detection)
- Demo: Voice Agent — memos, meeting transcription, and voice queries (ASR + TTS + DatabaseMixin) #389 (Voice Agent demo — validates the pipeline)
- Home Assistant integration: local AI-powered home automation (Tier 1 use case) #646 (Home Assistant integration — primary voice use case)
Acceptance Criteria
- Agent UI has a voice input button with push-to-talk
- Streaming transcription displays in real-time as user speaks
- Agent responses played back via TTS (toggleable)
- Voice and text produce identical agent behavior
- Works fully offline — local Whisper ASR + Kokoro TTS
- Latency: < 500ms from end of speech to start of agent processing
- Multi-command parsing: "turn kitchen lights to 50% and play jazz"
Metadata
Metadata
Assignees
Labels
agentaudioAudio (ASR/TTS) changesconsumerBlocks consumer adoption — must ship for the v0.20.0 consumer launch windowdomain:agent-coreFramework, tools, registry, memory, skills, orchestrationenhancementNew feature or requestp2low priorityspec-readyIssue has implementation spec adequate for coding-agent assignmenttalkTalk agent changestrack:consumer-appConsumer product track — mobile-first: voice + messaging + memory + skills
Activity
Roadmap overhaul: milestone-aligned plans, 9 new plan documents, voic…
Roadmap overhaul: milestone-aligned plans with voice-first P0 and 9 n…
kovtcharov commentedon Apr 26, 2026
Scope confirmation: voice loop must be platform-agnostic
Per the consumer-use-case review, voice-first parity is most consumer-impactful when the voice surface is wherever the user is — not exclusively the Agent UI mic.
Requested explicit scope clarifications
Why this matters
Without platform-agnosticism, voice-first becomes 'voice in the desktop app' — which is the experience consumers like least (laptop is for typing). Voice is most valuable when consumers are commuting, cooking, exercising — i.e., on their phone, via Telegram/WhatsApp/Slack — and the agent reaches them there.
This aligns with Hermes Agent's voice posture: TTS providers (Edge, ElevenLabs, OpenAI, MiniMax, NeuTTS) are wired at the runtime layer and consumed identically by CLI, Telegram, Discord, and Discord VC.
kovtcharov commentedon Apr 26, 2026
Technical spec — agent-boundary voice abstraction (v0.20.0 scope split)
Concrete starting point for
src/gaia/voice/(new package) and surface adapters consuming it. Reflects the post-#889/#896 scope split: the voice primitive lands at the agent boundary in v0.20.0; full multimodal model integration (Lemonade v10 dependent — #533/#539/#540) defers to v0.21.0.Scope split
VoiceIOinterface at the agent boundary/v1/audio/speechserver-side TTS endpointThe interface shipped in v0.20.0 is forward-compatible with v0.21.0 multimodal: when Lemonade v10 lands, the
VoiceIO.transcribestep becomes a no-op and audio frames flow directly to the model.Architecture
The
VoiceIOinstance is held by the agent, not the surface. Surfaces forward raw audio frames + a codec hint and receive transcripts back; surfaces forward agent text + receive an audio stream they can pipe to their native player.Interface
Default implementation —
DefaultVoiceIOCodec negotiation
CodecNegotiatoris the only component that touchesffmpeg. Surfaces do not transcode — the server does, in one place, so a Telegram OGG/Opus voice note and a browser WebM/Opus blob both arrive at Whisper as 16-kHz PCM mono.Per-skill response mode
Skills (#890) declare voice/text preference in frontmatter:
The Agent reads
skill.voiceafter skill recall (#888) and uses it to decide whether to callvoice.synthesize()on the response.Low-confidence ASR handling (no silent failure)
When
TranscriptResult.needs_clarificationis True, the agent does not silently send the low-confidence transcript to the LLM. It plays back a clarification prompt:This is the CLAUDE.md "no silent fallbacks" rule applied to ASR: a confidence-below-threshold transcript is an error condition, not a thing to silently shrug at.
Surface adapters (each ~80 LOC)
Each surface implements three things: collect audio, hand it to
voice.transcribe, playvoice.synthesizeoutput back. None of them re-implement ASR/TTS.src/gaia/ui/routers/voice.pyexposesPOST /api/voice/transcribe(multipart audio +Content-Typecodec) andGET /api/voice/synthesize(SSE stream of audio chunks). Browser sendsaudio/webm;codecs=opusfromMediaRecorder.voice.transcribe(no HTTP — direct call inside the bridge process); replies usevoice.synthesizeand uploads the result viasendVoice./api/voice/*endpoints as the Agent UI. iOS Safari sendsaudio/mp4;codecs=mp4a(no Opus support pre-iOS 17.4); the negotiator transcodes both ways.Tests — surface parity
Acceptance criteria → tests
test_agent_owns_voice_io— assertAgent.voiceis aVoiceIO; surfaces call into ittest_surface_parity(above)test_codec_negotiation— client offers[MP4_AAC], server picks compatible; refuses if no overlaptest_synthesize_streaming— assertsynthesize(streaming=True)yields >1 chunk for >50-word texttest_skill_voice_mode— load fixture skills withresponse_mode: voice/text/match_input, assert agent honors eachtest_low_confidence_clarify— feed garbled audio, assert agent plays back "did I get that right?" instead of forwarding to LLMgaia privacy verify(from #890 spec) — start a voice session, assert no outbound calls exceptlocalhosttest_voice_latency— end-of-speech to first TTS audio chunk < 800 ms on baseline hardware (Strix Halo)Failure modes (per CLAUDE.md)
RuntimeError(f"Whisper model {size} not found at {path}; rungaia init --download-voice"). Do NOT silently fall back to a smaller model.ValueError(f"unknown TTS voice {voice_id!r}; valid: {list_voices()}"). Do NOT silently substitute the default./api/voice/transcribeendpoint withAccept: <list of supported codecs>.privacy_mode != "device_only"in v0.20.0 → constructor raises immediately. Cloud voice routing is a v0.21.0+ topic; users should not be able to opt in by accident.TranscriptResult(text="", confidence=0.0, needs_clarification=True)and let the surface decide whether to prompt the user.Privacy invariant
A static-audit rule in #890's privacy verifier asserts that nothing under
src/gaia/voice/imports any HTTP client or opens any non-localhost socket. Audio frames must reach Whisper without leaving the process. CI fails the PR if a future change introduces a network call fromsrc/gaia/voice/.Dependencies
src/gaia/audio/whisper_asr.py,src/gaia/audio/kokoro_tts.py,src/gaia/audio/audio_recorder.py. No new model deps in v0.20.0.kokoro's deps). The codec negotiator importsffmpeg-python; surfaces don't.voice:field). Dynamic tool loading based on conversation context via memory #688 (dynamic tool loading) is independent.VoiceIOis replaced by a passthrough that hands raw audio to the model.Attribution
feat(webui): show generated images and audio inline in chat (amd#6384)
docs(plans): design dictation and voice mode (later release) (amd#6491)