Mirror of lmsanch/toryx-private#797
Production runtime for this fix is ~/.hermes/hermes-agent/ on spark-8a52 = this repo. A prior agent patched services/virtual_team/ on toryx-private by mistake — that tree is dev scaffolding for The Desk (NousResearch#552 / NousResearch#676 on toryx-private), not the live voice pipeline.
Symptoms
- Luis asks Eva in Spanish via Telegram voice message
- Eva replies in a generic English voice (Fish Audio fallback), not her Fish Audio
voice_id
- Cross-agent
consult_colleague calls also reported broken in the same incident
Three fixes to port from lmsanch/toryx-private's commit a4c045bf
The prior commit patched dead code on toryx-private but the LOGIC is right. Port to this repo's actual voice-reply path (located in gateway/ / tools/).
-
Voice brevity prefix must not hardcode English.
- Find the equivalent of
_VOICE_BREVITY_PREFIX in this repo (note: that exact symbol doesn't exist — start with grep -rnE "brevity|voice prefix|conversational" gateway/ tools/).
- Replace the English-only wording with an explicit language-mirror directive so each SOUL's
[RESPOND IN: <lang>] isn't overridden.
-
Reject empty voice_id at submit-time rather than silently passing it to Fish Audio.
- Find the Fish Audio TTS invocation. If
voice_id is empty, raise rather than proceed.
- Log ERROR (not silent) when a profile has no
fish_voice_id, so regression is visible at daemon start.
-
Deterministic [RESPOND IN: <lang>] injection per config/org_chart.md §3.3 (in toryx-private) — locate the prompt-composition path that builds the user turn for the LLM and inject a language directive based on detection.
- Heuristic first: Spanish diacritics + function words (fast, deterministic).
- Fallback:
langdetect (noisy on short strings — scope to ES-only v1).
- Env flag
HERMES_LANG_HINT_ENABLED (default true) to disable without a code change.
Smoke test
Send Eva a Spanish voice message from Telegram → she should reply in her own Fish Audio voice in Spanish. Logs should show a [RESPOND IN: ES] injection.
Tests
Port tests/unit/test_multi_bot_voice.py from toryx-private's a4c045bf to this repo's test location.
Don't touch
Parent issue (toryx-private)
lmsanch/toryx-private#797 — that tracks the user-visible regression; this repo has the actual fix.
Mirror of lmsanch/toryx-private#797
Production runtime for this fix is
~/.hermes/hermes-agent/on spark-8a52 = this repo. A prior agent patchedservices/virtual_team/on toryx-private by mistake — that tree is dev scaffolding for The Desk (NousResearch#552 / NousResearch#676 on toryx-private), not the live voice pipeline.Symptoms
voice_idconsult_colleaguecalls also reported broken in the same incidentThree fixes to port from lmsanch/toryx-private's commit
a4c045bfThe prior commit patched dead code on toryx-private but the LOGIC is right. Port to this repo's actual voice-reply path (located in
gateway//tools/).Voice brevity prefix must not hardcode English.
_VOICE_BREVITY_PREFIXin this repo (note: that exact symbol doesn't exist — start withgrep -rnE "brevity|voice prefix|conversational" gateway/ tools/).[RESPOND IN: <lang>]isn't overridden.Reject empty
voice_idat submit-time rather than silently passing it to Fish Audio.voice_idis empty, raise rather than proceed.fish_voice_id, so regression is visible at daemon start.Deterministic
[RESPOND IN: <lang>]injection perconfig/org_chart.md §3.3(in toryx-private) — locate the prompt-composition path that builds the user turn for the LLM and inject a language directive based on detection.langdetect(noisy on short strings — scope to ES-only v1).HERMES_LANG_HINT_ENABLED(default true) to disable without a code change.Smoke test
Send Eva a Spanish voice message from Telegram → she should reply in her own Fish Audio voice in Spanish. Logs should show a
[RESPOND IN: ES]injection.Tests
Port
tests/unit/test_multi_bot_voice.pyfrom toryx-private's a4c045bf to this repo's test location.Don't touch
services/virtual_team/tree — separate cleanup (feat: /insights command — usage analytics, cost estimation & activity patterns NousResearch/hermes-agent#552 / Feature: Cognitive Encoding — LLM Auto-Classification + Contradiction Consolidation on Memory Write NousResearch/hermes-agent#676).Parent issue (toryx-private)
lmsanch/toryx-private#797 — that tracks the user-visible regression; this repo has the actual fix.