Hands-free voice mode with animated visual in the GUI
Problem Statement
The GUI supports voice, but only as dictation plus read-aloud: click the mic to start, click again to stop, press Send, and optionally have the reply spoken. There is no hands-free conversation, so talking to Jarvis takes three clicks per turn, and nothing on screen shows whether it is listening, thinking or speaking.
Proposed Solution
A full-screen voice mode, opened from a button next to the mic in the chat input:
- Turn loop: listens until the user stops talking (energy-based voice activity detection in the browser), transcribes with the existing
/v1/speech/transcribebackend, sends the turn through the normal chat pipeline (same model, tools and history), speaks the reply with the existing TTS backend, then listens again. - Half-duplex: the mic is ignored while Jarvis thinks or speaks, so it cannot answer its own voice. Tapping the visual interrupts a reply (barge-in by touch).
- Visual state: an animated Three.js particle sphere that ripples with the mic level while listening, shifts colour and spins while thinking, and follows the real TTS output level (Web Audio analyser) while speaking.
- Speech-friendly text: markdown, URLs and code blocks are stripped before synthesis.
- Fully local with the default stack (faster-whisper + local model + Kokoro), no new keys.
Dependency: adds three to the frontend. It is lazy-loaded with the voice mode chunk, so the main bundle does not grow.
I have a working implementation with unit tests on my fork: https://github.com/wilwizard1979/OpenJarvis/tree/feat/voice-orb-mode (frontend only, no backend changes). Happy to open a PR once the approach looks good, or to adjust it based on feedback.
Primitive Area
Frontend
Alternatives Considered
- Continuous listening with echo cancellation only: lets the user interrupt by voice, but on laptop speakers the assistant tends to hear itself. Half-duplex plus tap-to-interrupt is more reliable as a default.
- Canvas 2D / CSS visual: no new dependency, but a convincing 3D particle sphere is much harder without WebGL. Three.js is lazy-loaded to keep the cost off the main bundle.
- Server-side VAD: would need a streaming audio endpoint; the browser-side detector reuses the existing transcribe endpoint unchanged.
Source: open-jarvis/OpenJarvis