Phonon TTS feasibility spike and ADR #17

Closed
opened 2026-10-25 14:58:42 +00:00 by dsh · 2 comments
Owner

Goal

Decide with evidence whether Phonon is worth a fourth engine, and write the ADR either way. Shipping it is not assumed.

Scope

  • Spike phonon-tts@0.4.1 in the shared Worker: q8 model (64.5 MB), bundled wasm, 24 kHz 80 ms frames.
  • Test threaded vs single-threaded: does enabling COOP/COEP break the DSH page or third-party assets? If yes, can isolation be scoped to the audio worker only?
  • Confirm the Apache-2.0 31m model is English-only and that 40m models are CC BY-NC (cannot ship by default).
  • Measure: time-to-first-frame, scheduling gaps under main-thread load, peak memory.
  • Write docs/adr/0004-phonon-engine.md with go/no-go, conditions, and what would change the answer (v1.0, API stability, multilingual permissive model).
  • If no-go: record it, close the spike, and remove Phonon from the README roadmap.

Acceptance

  • ADR exists with measured pass/fail numbers and a clear decision.
  • If go: a follow-up implementation issue is opened with labels; if no-go: the plan no longer promises Phonon.

Notes

  • Depends on #9. Part of M3. Facts/risks: docs/research/tts-engines.md §5 and §7.
## Goal Decide with evidence whether Phonon is worth a fourth engine, and write the ADR either way. Shipping it is **not** assumed. ## Scope - [ ] Spike `phonon-tts@0.4.1` in the shared Worker: q8 model (64.5 MB), bundled wasm, 24 kHz 80 ms frames. - [ ] Test threaded vs single-threaded: does enabling COOP/COEP break the DSH page or third-party assets? If yes, can isolation be scoped to the audio worker only? - [ ] Confirm the Apache-2.0 31m model is English-only and that 40m models are CC BY-NC (cannot ship by default). - [ ] Measure: time-to-first-frame, scheduling gaps under main-thread load, peak memory. - [ ] Write `docs/adr/0004-phonon-engine.md` with go/no-go, conditions, and what would change the answer (v1.0, API stability, multilingual permissive model). - [ ] If no-go: record it, close the spike, and remove Phonon from the README roadmap. ## Acceptance - ADR exists with measured pass/fail numbers and a clear decision. - If go: a follow-up implementation issue is opened with labels; if no-go: the plan no longer promises Phonon. ## Notes - Depends on #9. Part of M3. Facts/risks: `docs/research/tts-engines.md` §5 and §7.
Author
Owner

Spike implemented in f644170, awaiting the operator's audio proof.

  • phonon-tts@0.4.1 (English Apache-2.0 31m, q8 ≈65 MB).
  • Its worker is bundled (56 KB) and created as a Blob; wasm URLs are pinned to cdn.jsdelivr.net/npm/phonon-tts@0.4.1/wasm/ and passed via wasmUrl/simdWasmUrl.
  • threads: 1 so no COOP/COEP is needed; device: 'cpu'. Threads/WebGPU can be a follow-up if the single-thread speed disappoints.
  • Adapter src/engines/phonon.js: one curated voice (Phonon 31m), q8 load with progress, 24 kHz PCM through the shared queue, Cache API detection (phonon-tts-v1).
  • Engine picker entry + First-run copy (~65 MB + 4.4 MB wasm). 154 tests.

Decision points after the test: measured speed vs Kokoro, whether threads are worth the COOP/COEP trade, and whether the 40m multilingual models (CC BY-NC, non-commercial) are ever acceptable.

**Spike implemented** in `f644170`, awaiting the operator's audio proof. - `phonon-tts@0.4.1` (English Apache-2.0 31m, q8 ≈65 MB). - Its worker is bundled (56 KB) and created as a Blob; wasm URLs are pinned to `cdn.jsdelivr.net/npm/phonon-tts@0.4.1/wasm/` and passed via `wasmUrl`/`simdWasmUrl`. - **`threads: 1`** so no COOP/COEP is needed; `device: 'cpu'`. Threads/WebGPU can be a follow-up if the single-thread speed disappoints. - Adapter `src/engines/phonon.js`: one curated voice (Phonon 31m), q8 load with progress, 24 kHz PCM through the shared queue, Cache API detection (`phonon-tts-v1`). - Engine picker entry + First-run copy (~65 MB + 4.4 MB wasm). 154 tests. Decision points after the test: measured speed vs Kokoro, whether threads are worth the COOP/COEP trade, and whether the 40m multilingual models (CC BY-NC, non-commercial) are ever acceptable.
Author
Owner

Delivered: Phonon 31m q8 is a first-class engine with 24 curated voices; operator confirmed quality and speed.

Delivered: Phonon 31m q8 is a first-class engine with 24 curated voices; operator confirmed quality and speed.
dsh closed this issue 2026-11-06 04:36:07 +00:00
Sign in to join this conversation.
No description provided.