Repository navigation
feat(speech): redraw whole speech replies that jump to a high register - #1162
plotarmordev wants to merge 5 commits into
Conversation
--allowed-controls keeps listed delivery controls in a normalized form and strips other cue-only brackets before speech input validation; contextual and unknown brackets stay as written. The built-in cue word list holds only words from tags in Fish Audio's public sources.
Add --silence-floor-dbfs and --silence-seconds so native Drama speech can stop after a sustained run below an explicit frame-power floor, keeping the audio and reporting the finish as silence. The guard is off unless both flags are set and is refused for non-speech models.
Bring the opt-in --allowed-controls filter onto the silence guard so silence redraws can reuse its rules. The two changes touch separate flags; only the changelog and the flag parser needed joining.
Add --silence-redraws with an optional --silence-redraw-budget-s and --silence-redraw-controls so a whole reply that ends as silence is drawn again with a salted seed while the budget and X-Deadline-S allow. Streams are never redrawn, and enabled redraws report X-Silence-Redraws.
Add --register-redraw-st, --register-redraw-high and --register-high-hz so a whole reply whose later phrase opens well above the others in a high register is drawn once more, keeping the take with the smaller jump. Configured replies report X-Register-Trip and X-Register-Redraws.
|
Thanks @plotarmordev for register thresholds that are all-or-none with no defaults, the strict smaller-jump selection that keeps ties on the first take, and the test that keeps the held take safe through later silence redraws ( - Synthema, Ash's AI Assistant. |
… both set - zig/src/server/speech_register_test.zig: with both rules set, short stops are redrawn without a register measurement, a take the short rule leaves is still register-redrawn, a register retry that ends short reenters the short redraws, and the held take beats takes the short rule tripped; validation and the refusal cover both rules.
|
Landed on main as 4e61579 with a maintainer fix-up (3101731) that tests the short and register rules together, thank you @plotarmordev. Replies that jump to a high register are redrawn. On a GB10, the default Drama output stayed byte-identical to main on six inputs with these options off, repeats were 6/6 equal, and concurrent equalled solo. The speech, Drama, server and golden host suites pass on current main. - Synthema, Ash's AI Assistant. |
|
This shipped in TensorFold 1.1.4: https://github.com/ashhart/TensorFold/releases/tag/v1.1.4 Thank you @plotarmordev for the contribution. - Synthema, Ash's AI Assistant. |
What this changes
Stacked on the silence-redraws PR (#1160); review the diff against its tip
49ea53bd.Adds an opt-in register guard,
serve --register-redraw-st ST --register-redraw-high PERCENT --register-high-hz HZ, to whole Drama speech replies. A take trips when a phrase after the first opens ST semitones or more above the median opening of the other phrases, with PERCENT or more of its voiced frames above HZ. A tripped take is drawn once more, and the take with the smaller jump is sent.--silence-redraw-budget-sis accepted with the register guard alone.--silence-redraw-budget-sandX-Deadline-S, which is read whenever the guard is on.silenceand has a strictly smaller jump. Ties keep the first take, and alengthredraw may replace astoptake.silence, the remaining silence redraws run before the comparison, and the held take is never overwritten.X-Register-TripandX-Register-Redraws, each0or1.X-Register-Tripis 1 when a measured take tripped.X-Register-Redrawsis 1 when the register redraw was admitted, even if the first take is kept. Streams and errors omit both. Register redraws do not count towardX-Silence-Redraws.register jump=for each trip, andregister unmeasured:with the reason for an unmeasured take.--register-redraw-st 6 --register-redraw-high 50 --register-high-hz 300. Thresholds are calibrated on the served voice, asdocs/speech-redraws.md#registerdescribes.Receipt
a238eb79, on the silence-redraws PR's49ea53bd, on maind1018b31. Host tests: Linux aarch64, Zig 0.17.0, CPU only, no MLX or PyTorch. GPU run: one NVIDIA GB10, native CUDA build (-Dsm=121), no MLX or PyTorch, checkpointfishaudio/drama-3with itscodec.pth(revision not recorded), built-in voice. Stock is upstreamd1018b31. The candidate isca60e9c8, an integration of all the open Drama patches ond1018b31, this one included, not this branch's tip.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: speech returns PCM, so PCM is compared by SHA-256.TENSORFOLD_SEED_SALT0, 10 and 20), each sent the same 10 public synthetic texts: 180 requests, all complete. Every server ran with--parallel 1 --no-drafts --prompt-cache-gib 0 --context 4096andTF_DRAMA_PREFILL_ROWS=1, which keeps the candidate on stock's prefill schedule.--silence-floor-dbfs -50 --silence-seconds 8("base"); base plus--silence-onset-s 2 --silence-onset-voiced-s 0.4 --silence-mid-s 2 --silence-mid-min-voiced-s 0.4("silence"); silence plus--silence-redraws 2 --silence-redraw-budget-s 60 --silence-redraw-controls '' --short-reply-ratio 0.6 --short-reply-chars-per-s 12("redraw"); and--register-redraw-st 6 --register-redraw-high 50 --register-high-hz 300 --silence-redraw-budget-s 60("register").silenceor was judged short. Each of the 22 silenced takes in the base and silence arms is a prefix of the off audio.X-Register-TripandX-Register-Redrawswere present on all 30 register-arm replies and summed to 0, and all 30 equal off byte for byte. The run shows only that the measure leaves untripped replies unchanged; a trip and its redraw are covered by the host tests below.seedFor(prompt, salt + k)after any silence redraws.tools/bench_openai.py: not measured; the GPU run compared PCM, not speed. The pitch measure runs on the CPU after a whole take, only with the flags set. A redraw runs only after a trip and within the budget.ttft_sfromtools/bench_cache.py --require-coldon a long prompt, or "n/a" with the reason when the change cannot reach prompt processing: n/a. The first take's prompt path is unchanged, and the register redraw reuses the current prompt.zig build test --summary all: 213/213 steps, 1848/1852 passed, 4 skipped. A first run timed out after 3600 s, with cortheon linear-time and benchmark-stream timing failures in untouched code.CUDA_VISIBLE_DEVICES= zig build test-cuda-host --summary all: 131/131 steps, 1236/1240 passed, 4 skipped.fuzz-cortheonalone: 11/11.test-kernel-contract: 65/65.test-golden: 306/319 equal, 0 unexpected differences; additional corpus 26/26.drama3-generatebuild: 101/101 steps.tools/zig/test_speech_flags.py: 1 test passed.zig build test, the CUDA-host suite, the native build and the speech-flag test again. Goldens stayed at 306/319 and 26/26 through the retry-pipeline change.37079ece:zig fmt --checkpassed.zig build test --summary all: 213/213 steps, 3011/3025 passed, 14 skipped.CUDA_VISIBLE_DEVICES= zig build test-cuda-host --summary all: 131/131 steps, 399/399 executed tests passed (unchanged steps cached).tools/zig/test_speech_flags.py: 1 test, OK.7fc18a07, the unsquashed branch tip, after merging the silence-redraws tip2e6d4858, which changes one plain-speech test input:zig fmt --checkpassed, andzig build test --summary allpassed 213/213 steps, 3011/3025 tests, 14 skipped.a238eb79, which squashes that branch over49ea53bd:zig fmt --checkpassed, andzig build test --summary allpassed 213/213 steps, 3012/3026 tests, 14 skipped.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.SUMMARYline is in the receipt.