Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused voice-layer fix. The reported regressions remain on current main: cli.py:11375 and hermes_cli/voice.py:784 pre-truncate to 4000 characters, while tools/voice_mode.py:1102 applies the 300-second system-player wait. The provider-aware downstream limit already exists at tools/tts_tool.py:2188.
Problems
voice.max_tts_charsis user-facing configuration, but the canonical voice configuration block atwebsite/docs/user-guide/features/voice-mode.md:386-394is not updated.cli-config.yaml.exampleis useful, but it is not the feature reference users are directed to.
Suggested changes
- Document
voice.max_tts_charsin that Voice Mode config block, including itsnull/omitted behavior and positive-value semantics.
This is an automated hermes-sweeper review.
Voice mode applied a hard 4000-character limit before text_to_speech_tool and killed ffplay after 300s on MP3/OGG playback. Defer length limits to provider caps unless voice.max_tts_chars is set; probe file duration for ffplay wait. Adds regression tests and repro script. Fixes NousResearch#53587
94814b2 to
cf0876d
Compare
Preserve the provider-deferred text limit and duration-aware playback while integrating the newer normalization, streaming, and config-default paths.
30e9ce8 to
17be93c
Compare
Verification comment (Vox Lockin lane 10 — adversarial check)Verified this PR against current What this PR gets right (head
Residual gaps (why a class-completion PR was needed):
Composition: I shipped lane 10's class-completion PR #78234 which builds on this PR's approach (credit: "salvaged from #53589, authored by @Nomadcxx") and adds provider-level splitting + concatenation, streaming sentence splitting, the websockets v15 header fix, and regression tests. If #53589 merges first, #78234's overlapping hunks are trivially reconcilable; if not, #78234 carries the class to completion with attribution. |
|
@andrexibiza I merged current Since your check, #81766 added provider-level splitting and removed the 4,000-character caller caps. Current This PR keeps the optional |
Thanks — I verified the current state, and this resolves the concern I raised. I’m updating my position accordingly: #53589 should stay the canonical PR for the work it owns, and I’ll treat the remaining streaming-sentence issue as a separate reconciliation problem rather than something that supersedes this branch. I also appreciate you taking the time to rebase, resolve the conflicts, and come back with a precise current-state update. This is the kind of handoff I want the interlock process to support. |
fix(voice): remove 4000-char speak cap and scale ffplay wait to file duration Removing the arbitrary 4000-char pre-truncation (deferring to the provider cap, with an optional
|
|
Checked each item against the current branch. The unknown-duration path already times out after 3,600 seconds. I am keeping the probe and exact slice. The probe supplies the duration needed to avoid cutting off long files, and |
What does this PR do?
Voice mode stopped reading long replies early for two stock Hermes bugs:
speak_textandcli._voice_speak_responsesliced input to 4000 characters beforetext_to_speech_tool, andplay_audio_filekilledffplayafter 300 seconds on MP3/OGG files.This PR removes the hard 4000-char cap, centralizes markdown prep in
prepare_voice_tts_text(), adds optionalvoice.max_tts_chars(defaultnull= defer to provider limits), and scales theffplaywait fromffprobeduration.Fixing #50082 alone does not address these voice-layer limits.
Related Issue
Fixes #53587
Related: #50081 (synthesis subprocess timeout, separate layer)
Related PR
Related: #50082 (command-provider timeout mitigation; not a substitute for this change). No overlap in
tools/tts_tool.pyin this branch.Type of Change
Changes Made
hermes_cli/voice.py—voice_max_tts_chars(),strip_markdown_for_voice_tts(),prepare_voice_tts_text();speak_textuses shared prepcli.py—_voice_speak_responsecallsprepare_voice_tts_texthermes_cli/config.py— defaultvoice.max_tts_chars: nullcli-config.yaml.example— documentvoice.max_tts_charstools/voice_mode.py—_audio_file_duration_seconds();play_audio_filewait = probed duration + 30s (3600s fallback)scripts/repro_voice_tts_playback.py— minimal repro (FAIL onmain, PASS on this branch)tests/hermes_cli/test_voice_wrapper.py—TestVoiceMaxTtsChars, updated speak cap regressiontests/tools/test_voice_cli_integration.py—test_long_text_not_pretruncatedtests/tools/test_voice_mode.py—TestPlayAudioFfplayWaitTimeoutExplicitly excluded:
tools/tts_tool.py/_run_command_ttsidle timeout (#50082)How to Test
python scripts/repro_voice_tts_playback.py— expect PASS on this branch, FAIL onmainscripts/run_tests.sh tests/hermes_cli/test_voice_wrapper.py tests/tools/test_voice_mode.py tests/tools/test_voice_cli_integration.pytts.provider: edge,/voice on,/voice tts, reply >5000 chars — confirm no 4000-char slice beforetext_to_speech_toolplay_audio_file(path)— confirm playback reaches EOFChecklist
Code
fix(voice): ...)tts_tool.pyhunks)Documentation & Housekeeping
cli-config.yaml.exampleforvoice.max_tts_charsffprobe/ffplayviashutil.which; WAV path unchanged)Platforms tested