Fill voice-mode silence with localized fillers and work sounds - #32
Draft
Piggidragon wants to merge 5 commits into
Draft
Piggidragon wants to merge 5 commits into
Piggidragon wants to merge 5 commits into
Conversation
While the agent reasons or runs tools, voice mode went quiet after its single
"Let me think" phrase. Short murmurs ("Hmm...", "Mhm.") are now rendered once in
the selected voice when voice starts and played locally during long thinking
turns, spaced further apart the longer the turn runs. Barge-in, compaction and
End cut them off; VOICE_STATUS_SPEECH=false and the sequential pipeline disable
them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Voice mode now fills long work with more than murmurs. Tool announcements
("Ich schau kurz im Browser nach.") play once per kind per turn for tools still
running after a second. Long turns mix in "still on it". The thinking phrase
plays from pre-rendered clips. Spoken fillers and the thinking and compaction
notices follow the input language (browser language on auto-detect) for twelve
languages. Other languages fall back to wordless murmurs only.
With interface sounds on, synthesized typing, a page rustle and completion
tones accompany tool calls. Clips render only between turns and are cached per
voice and language across voice restarts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The browser rendered every filler clip again on each page load, spending about 20 seconds of speech runtime per language. The portal now renders the clips in the background when voice is set up, its settings are saved or the portal starts. Rendering pauses while live speech or transcription runs. Clips live under DATA_DIR/voice-clips, keyed by a fingerprint of everything that shapes the voice. Voice mode only downloads them, as immutable responses, and picks up the rest as rendering finishes. The phrase tables move to the server, which also serves the status notices in the voice language. The browser no longer renders or chooses wording. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Murmurs played on a timer regardless of context, and speech runtimes render
"Hmm." as two hums. The agent already announces its tool calls, so generic
tool announcements repeated it.
Fillers now each have a cause:
- an acknowledgement 0.3 s after a request ("Mal sehen." for a question,
"Okay." otherwise), replacing the live thinking notice for that turn
- a note on what is still running when a tool takes over 6 s (tests,
install, build, command, page load, search)
- a reaction to a failed call, or after a long tool once the agent goes quiet
- "still on it" only after 15 s of silence
A reply that arrives during a filler waits for it to finish. Clips for phrases
no longer in the tables are removed from disk.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In voice mode, once the single "Let me think about that" phrase has played, nothing is heard while the agent reasons or runs tools. Long silences feel sterile and make it hard to tell whether anything is still happening.
What
Spoken fillers, tied to what is happening
Nothing plays on a timer alone. Wordless murmurs are not used: Chatterbox renders
Hmm.and lone words likeOkay.twice. The agent already announces each tool call itself (voice-first instructions), so fillers do not repeat that.Mal sehen.for a question (transcript ends in?),Alles klar./Mach ich.otherwise. One- and two-word replies (Danke) get none, and at most one plays every 15 s. It replaces the live "let me think" notice for that turn.Die Tests laufen noch., installs, builds, commands, page loads, searches.slowFiller()inweb/src/tool-kind.tsdoes the classification.Das hat nicht geklappt.0.8 s after a failed call (at most twice per turn).Okay, mal sehen.1.2 s after a tool stretch of 4 s or more, if the agent is quiet.web/src/voice-phrases.tscover en, de, es, fr, it, pt (BR), ru, zh, ja, ko, hi and ar. The thinking and compaction notices use the same tables. First-person phrases are worded gender-neutrally where the language marks gender (hi, ru, ar), since the voice may be either.server/src/voice-clips.tsrenders missing clips in the background when voice is set up (/voice/connect), its settings are saved or the portal starts. It pauses while live speech or transcription requests run (5 s quiet window) and keeps a managed runtime's lease while a batch runs. Clips are stored as PCM underDATA_DIR/voice-clips/<version>/<sha256(text)>.pcm.versionis a fingerprint of the speech settings and the voice preset or Aria reference, so a voice or language change renders a new set. The four most recently used sets are kept. Auto-detect languages that clients asked for are remembered and kept rendered.GET /api/voice/clips?languages=…returns the phrase list with a ready flag and the status notices in the voice language.GET /api/voice/clips/:version/:hashserves a clip asimmutable. The browser loads the ready clips and checks back while the rest render. It never renders speech itself.server/src/voice-phrases.ts. The speech handler's upstream request moved intoupstreamSpeech(), which the handler and the renderer share.VOICE_STATUS_SPEECH=falseand the sequential pipeline turn all spoken fillers off.Work sounds (follow the existing interface-sounds toggle)
web/src/work-sounds.tssynthesizes quiet sounds with WebAudio, so there are no downloads. There are irregular typing runs while a command or edit runs, and a page rustle when a read, search or browser call starts. Both play only during Thinking, never over speech.voiceCuetones mark a tool the listener waited on (≥ 1.5 s) finishing. The failure tone is lower.Refactors
web/src/tool-kind.ts: tool classification is shared withVoiceToolActivity.Tests
tests/hands-free.test.mts: growing murmur gaps; a pre-rendered thinking phrase replaces live synthesis; barge-in aborts a filler;statusSpeech: falsesilences fillers; tool announcements (quick tools skipped, once per kind per turn, quiet window after speech); German compaction notices.tests/voice-clips.test.mts: clips render once and survive a restart, rendering waits for live speech, a voice change mid-batch, disabled status speech, path safety, pruning, remembered languages.tests/voice.test.mts: clip list in the requested language, immutable serving from disk, version changes with the voice.tests/voice-fillers.test.mts: silence trimming; every language table is complete; language resolution; tool classification.webtsc -b+vite buildpass. The hands-free, fillers, speech-pipeline, voice, pcm-stream and voice-panels suites pass.Not yet checked by ear. How natural the murmurs sound depends on the TTS backend, and the non-English phrases are worth a check by native speakers. Phrases, gains and timings are constants and easy to tune.
🤖 Generated with Claude Code