Repository navigation
Server: close session on room noise, latest utterance wins, pre-warm voice model (#105, #181) - #204
Merged
Merged
Conversation
With the #175 turn lock, room-noise turns queue behind a running reply and are answered late, in order, after the person has moved on. Number each turn per session before it waits for the lock and drop any turn that was overtaken by a later one. Turns with no user words never supersede a real one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mic left open in a busy room kept feeding TV and podcast audio to the LLM. Level cannot separate that from a quiet child, so count Whisper's own confidence signals (empty/dropped transcript, no_speech >= 0.45, avg_logprob < -1.0) and end the session through the same path as the no-voice timeout when three come in a row. Any real turn resets the run; the setting is configurable and 0 disables it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first reply after an idle spell took ~12 s because llama-swap had unloaded the 4B, with the mic open and anything said read as a barge-in. The device WebSocket opening is the earliest signal, so send a one-token request then. Rate limited, fire-and-forget, and a failure is only logged. llama-swap is shared with other services, so its TTL is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
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.
Summary
a1e5ee1): a turn queued behind the fix: serialize PiVoice RPC turns #175 turn lock is skipped when the same session said something newer. Empty turns never supersede a real one.def8d73): after 3 noise-like ASR turns in a row (empty or dropped transcript,no_speech>= 0.45, oravg_logprob< -1.0, each within 90 s of the last), WhisperLocal ends the listening session like the no-voice timeout; touch or wake word reopens. A real turn resets the run. Keys:noise_turn_limit(3,0disables),noise_no_speech,noise_avg_logprob.91235f9): when a device WebSocket opens, PiVoiceLLM sends llama-swap a 1-token request forqwen3.5:4b(max once per 5 min, background thread, failures only logged).prewarm: falseturns it off. llama-swap config is untouched.Evidence
tests+custom-providers/pi_voice/tests), 316 passed (dotty-behaviour/tests). The new tests fail without the fixes.PiVoiceLLM ready, no regressions attributed to these commits.ASR-NOISE-CLOSEcount in all case logs: 0 (no false close on real prompts; real prompts scoredno_speech<= 0.14,avg_logprob>= -0.89).PiVoiceLLM prewarm ok in 1.2-1.5 sseen on several robot connects.What is NOT proven
end_session, the mic closing) is only covered by unit tests with a stubbed closer. No false-positive check against a quiet child either.ttl: 0forqwen3.5:4b, so the 12 s cold start in the issue may have come from matrix eviction by another model, which pre-warm only partly helps.skipping queued turnlines).pi process exited mid-turnat 03:32:43 was investigated: not caused by this PR (the whole dotty-* container set was stopped and restarted at that moment; pre-warm is a plain HTTP call that never touches the pi process, and latest-wins only decides before the lock).Refs #105
Refs #181
AI-assisted: drafted and implemented by Claude (Opus 5.5); a human reviews and is accountable for what lands.
🤖 Generated with Claude Code