QVAC-24107 test[tts-ggml]: extend model-load consolidation pattern to supertonic + addon - #4036
Merged
Merged
Conversation
…h test The standalone "aborting the run via signal rejects the response" test loaded Supertonic with default construction (F1/en/CPU) and issued one already-aborted run() to prove the AbortSignal plumbing rejects synchronously. The basic-synth test uses the same construction and completes its own synth first — so the abort call can piggyback on that loaded model without a second load. The abort must be the LAST engine call on the shared instance (the header comment on the original test warned native cancel-teardown wedges macOS process exit; the already-aborted signal path short-circuits before addon.runJob, so this is safe as long as no further synths follow it). Coverage retained: exact same abort assertion runs against the same construction. Only the extra model.load() is gone. Follow-up to PR #4013's cosyvoice3 pilot pattern.
…h-WER test
The standalone "streaming input + streaming PCM output (runStreaming + onUpdate)"
test loaded Chatterbox with loadChatterboxTTS({modelDir, language:'en'}) and
called runChatterboxStreaming on 3 phrases. The English-WER test loads the
identical construction and iterates English sentences via runChatterboxTTS —
same instance can serve both.
The streaming block is inserted BEFORE the WER test's model.unload() (line
after the sentence-loop, before whisper is loaded). Its 3-phrase run adds
~15-20s per leg; the target test's timeout is 30 min so ample headroom.
Coverage retained: all original streaming assertions (passed, sampleCount > 0,
reportedSampleRate === 24000, streamChunkCount === phrases.length,
sentenceChunks match) run against the shared loaded model.
Follow-up to PR #4013's cosyvoice3 pilot pattern. 5 → 4 tests, one
model.load() removed per CPU-heavy leg.
Contributor
Review StatusCurrent Status: ✅ APPROVED |
Contributor
License compliance — cleanNo new dependency license findings in this PR. Warn-only (shadow) mode — this check does not block merges yet. Updated automatically by the canonical license compliance workflow. NOTICE presence (advisory)Missing NOTICE (advisory, does not block):
|
Zbig9000
approved these changes
Aug 25, 2026
GustavoA1604
approved these changes
Aug 25, 2026
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.
Summary
Extend the model-load consolidation pattern from PR #4013's CosyVoice3 pilot to two more integration test files. Two model.load() calls removed per CPU-heavy leg.
Closes QVAC-24107.
Prerequisite investigation (Phase 1a — done)
QVAC-24107 flagged
speech-cppreload()semantics as a prerequisite for deeper consolidation (Version B: 20–25 min/leg saving). Investigation result: reload() calls unload() + load() internally on every engine — the GGUF file is re-parsed each time. No parse-skip.Per-engine table (from reading
packages/tts-ggml/addon/src/model-interface/**/*.cpp):Consequence: Version B (extended folds via reload transitions on
chatterbox-speed,output-sample-rate,parleremotion/description) is disproved — a "1 load + 3 reloads" restructure would cost the same as 4 loads. Only Version A's deterministic folds ship here.If someone wants the deeper win in future work, the path is
speech-cpp-side: add a "swap sampling params without re-parsing GGUF" API, or a shared engine pool across process invocations. Out-of-scope for this test-side ticket.Measured CI wall-time impact
Same-day comparison against the
mainbaseline used in PR #4013 (workflow_dispatch run32729043118) plus the merged PR #4013 CI (run32774343662):Read:
Changes
packages/tts-ggml/test/integration/supertonic.test.js(5 tests → 4)F1/en/CPU). Abort call runs AFTER the successful synth and MUST be last (the native cancel-teardown path — mid-flight cancel wedging macOS process exit — is intentionally NOT covered here; an already-aborted signal short-circuits beforeaddon.runJob).packages/tts-ggml/test/integration/addon.test.js(5 tests → 4)loadChatterboxTTS({modelDir, language:'en'})— identical construction. Streaming block runs BEFORE the WER test's mid-bodymodel.unload()(must not move).passed,sampleCount > 0,reportedSampleRate === 24000,streamChunkCount === phrases.length, per-chunksentenceChunksmatch) run against the shared loaded model.Investigations audited and NOT consolidated
Rationale mirrors PR #4013's "Investigations that did not ship":
variant × quant— 5 entries) — each entry proves a distinct GGUF loads and synthesizes. Matrix is the point.voice: Laurawith per-test unique assertions; the "all-defaults" test omits voice AS its assertion. No safe fold.cosyvoice3-lavasr.test.js) — enhancer path,streamChunkTokens,outputSampleRate, denoiser presence are all load-time. Every load exercises a distinct native code path.variant × kvCacheType × GPUis the coverage story.speedis validated atChatterboxModel::validateConfigload time; the 4 loads are the test.referenceAudio/promptText(load-time files).useGPU,includeEncoder,useModelDir— the whole point of the pair.What did NOT change
.github/workflows/**edits.package.json/CHANGELOG.md/README.mdedits — test-only change.t.skip/.only/ commented-out tests introduced. Zero test files deleted.Test plan
run-desktop-addon-testslabel: the seven-legrun-integration-testsmatrix exercised the touched files. Same-daymainbaseline comparison above.prettier --checkandnode --checkon both files.