feat: add STT transcript echo toggle - #54257
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new configuration toggle to control whether inbound voice-message STT transcripts are echoed back to the user, while keeping STT transcription available to the agent. This fits into the gateway’s STT pipeline and Hermes’ config defaults by making transcript echo configurable without changing the default UX.
Changes:
- Add
stt.echo_transcripts(config.yaml default) /stt_echo_transcripts(GatewayConfig field + top-level override) to control transcript echo behavior, defaulting totruefor backward compatibility. - Gate transcript echo in the fresh voice-message STT path and one queued/dequeue transcription path via
GatewayRunner._should_echo_stt_transcripts(). - Add focused unit tests for config precedence/defaults and for the runner helper behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/gateway/test_stt_transcript_echo_config.py |
Adds tests for default behavior, nested-vs-top-level precedence, and runner gating helper. |
hermes_cli/config.py |
Introduces the new stt.echo_transcripts default in the user-facing default config. |
gateway/run.py |
Adds _should_echo_stt_transcripts() and uses it to gate transcript echo in two STT echo call sites. |
gateway/config.py |
Extends GatewayConfig with stt_echo_transcripts, supports parsing from stt.echo_transcripts, and includes it in to_dict(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def _should_echo_stt_transcripts(self) -> bool: | ||
| """Return whether inbound voice/STT transcripts should be echoed to chat.""" | ||
| return bool(getattr(self.config, "stt_echo_transcripts", True)) |
Related (competing config feature, not a duplicate): this is part of a saturated STT-transcript-echo-toggle cluster. Notably #46910 adds the exact same |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Adds a configurable STT transcript echo toggle (stt_echo_transcripts). Defaults to True for backwards compatibility. The gate is applied at all transcript echo points (fresh messages, voice interrupts, queued messages). Test verifies the config wiring and uses a source-level assertion to confirm all echo sends are gated.
Reviewed by Hermes Agent
|
Closing this old branch so we can rebuild the Hermes changes cleanly from current main and reopen smaller fresh PRs. |
Summary
stt.echo_transcriptsconfig to keep voice-message STT enabled while suppressing the user-facing 🎙️ transcript echoTest Plan
scripts/run_tests.sh tests/gateway/test_stt_transcript_echo_config.py tests/test_gateway_streaming_nested_config.py