Repository navigation
v0.1.3: ask the TTS for the pause instead of holding audio back; generation ids; bounded TTS wait; interrupt fixture - #19
Merged
Conversation
…generation ids; bounded TTS wait - tts-service: /stream and /synthesize take an optional "pause" (seconds of silence after the sentence); the leveler pads that instead of --sentence-pause. standalone asks for chunk_pause_ms and forwards every block as it arrives: the 1.2 s tail hold and its trimming are gone, so the first frame leaves with the first PCM block (0.19 s sooner) and the occasional 0.13 s gap at the start of an answer no longer happens. - Every event on the bus carries the answer number (gen); tts_start / pcm / chunk_end are published from the worker thread at request / arrival / end time, not when the paced event loop dequeues them (the 10-16 per-sentence RTF figures were inflated by that; corrected in the docs). - TTS read timeout 60 -> 10 s (tts.read_timeout_s); the wake acknowledgement keeps 60 s for a cold start. - loopback: --abort-after and --then; bench/tts_fault_proxy.py and bench/interrupt_fixture.py (button interrupt + new question, with a TTS 500 or hang injected); tests for the interrupt, TTS error, blocked TTS, read timeout and the pause request. - native-tts patch regenerated from the build the demos used: the tail pad feeds codec silence frames (QWEN3_TTS_TAIL_PAD_CODES) instead of repeating the last frame; docs follow. - bench/results/traces-2026-10-18 and interrupt-2026-10-18: measurements with this code.
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.
Follow-up to the forum feedback on the PCM traces. Measurements with this code are in
bench/results/traces-2026-10-18andbench/results/interrupt-2026-10-18.No more tail hold. tts-service's
/streamand/synthesizetake an optionalpause(seconds of silence after the sentence, 0–3, else 400); the leveler pads that instead of--sentence-pause. The standalone server asks forchunk_pause_msper sentence and forwards every block as it arrives, so the 1.2 s hold and its trimming are gone (voice.tail_hold_msremoved). Taking turns: the first frame now leaves with the first PCM block, 1.77–1.96 s in three runs (it used to wait 0.19 s for the next block), and the 0.13 s gap at the start of an answer is gone (0 in 3 of 3). What plays is unchanged on a matched pair (same pause and silence statistics; no audible difference blind, one listener).Events carry the answer number.
genon every bus event;tts_start/pcm/chunk_endare published from the worker at request / arrival / end time rather than when the paced event loop dequeues them. That dequeue timing had inflated the per-sentence RTF figures published from the 10-16 traces (0.96–0.98 / 0.84–0.89); re-measured at arrival they are 0.6 (first sentence 1.3–1.5 only while the LLM is decoding). The 10-16 README and docs/benchmarks carry the correction.Bounded TTS wait.
tts.read_timeout_s(default 10, was 60); the wake acknowledgement keeps 60 s for a cold start.Interrupt fixture.
loopback.py --abort-after S --then "...";bench/tts_fault_proxy.pyinjects a 500 or a hang;bench/interrupt_fixture.pychecks that nothing of the aborted answer leaks into the next one, with results for clean / 500 / hang. Unit tests cover the abort, a TTS error, a blocked TTS, the read timeout and the pause request (52 passed).Engine patch.
native-tts/qwen3-tts-cpp-16bb5af.patchregenerated from the build the demos and measurements were made with: the tail pad feeds codec silence frames (QWEN3_TTS_TAIL_PAD_CODESto override) instead of repeating the last frame, which doubled the ending audibly. Same C ABI. Docs follow. The v0.1.3 prebuilt package is built from this patch and will be attached to the release after it is checked on the GPU.