fix(cli): route voice reply behavior by input origin - #7314
Closed
KeroZelvin wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing this stale branch version in favor of the rebased draft replacement: #11744 That new draft is rebased onto current |
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.
This PR makes Hermes treat speech-originated turns differently from typed turns, so voice-specific prompt shaping and TTS reply behavior only apply when the input actually came from voice.
Summary
input_originpath instead of treating them like typed inputFor Humans:
This PR teaches Hermes to distinguish:
from
Right now, those can get mixed together in the CLI voice flow.
The branch adds an explicit
input_originconcept:"text""voice"Then Hermes uses that signal to decide when to apply voice-specific behavior.
Concretely, it changes 3 things
Instead of queueing a raw transcript string, the voice recorder now queues:
(transcript, [], "voice")That means the main input loop knows “this turn came from speech.”
When a turn is marked
"voice", Hermes can:When a turn is normal typed text, it won’t accidentally inherit that voice-specific behavior.
It introduces:
voice.message_reply_modewith default:
"all"That supports behavior like:
"voice_only"= only speak responses for voice-origin turns"all"= speak for both, if that’s what the user wantsWho benefits
Problems it prevents
NameError: input_origin is not definedWhy that matters in practice
Without this routing, “voice mode on” can become too blunt:
This PR makes voice mode more predictable:
That makes Hermes feel much more natural in hybrid use.
What changed in code terms
From the diff:
chat(..., input_origin: str = "text")("voice")origininput_origin == "voice"_voice_ttsinput_origin/message_reply_modeTests added/updated
The branch also adds regression coverage for:
NameError"voice"originTest Plan
Notes
input_originrouting behaviororigin/mainand replay-verified locally