Piper WASM adapter with voice download and OPFS cache #10
Labels
No labels
NaNs
area/audio
area/build
area/docs
area/dsh
area/engine
area/security
area/ui
needs-operator
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-whale-noises#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The first real voice: Piper running entirely in the browser, with an honest download story.
Scope
@mintplex-labs/piper-tts-web@1.0.5(MIT) + pinnedonnxruntime-web@1.18.x(the 1.0.5 build importsonnxruntime-web/wasm; never float it). Record the provenance caveat: the 1.0.5 tarball contains code absent from the public GitHub repo.en_US-lessac-medium(official catalog, single speaker, 63.1 MB). Additional M1 voices:en_US-amy-medium,en_US-hfc_female-medium, and one non-English voice (de_DE-thorsten-medium) to prove the multilingual option.en_US-glados-medium(not in the official catalog; only unofficial fan/ncnn clones, no licence) anden_US-libritts_r-medium(2,306 speakers — needs a speaker picker). Both are handled by #23 and the M2 catalog decision.prepare(voiceId, onProgress): explicit user action only; progress; detectstored()so a cached voice loads without re-download;remove()for purge; OPFS availability check with a clear fallback message.synthesizein the Worker: text → WAV Blob →decodeAudioDatain the main thread (or PCM transfer); honour rate via the queue.AudioContext/OPFS; if unavailable, mark engine unavailable with a reason.piper-tts-web@1.1.2or a direct ONNX+phonemizer build if the fork dies.Acceptance
Notes
docs/research/tts-engines.md§3.Code landed in
9193f7c(workerf586bbc). Piper + ORT 1.18 are bundled into the embedded worker;createPiperEnginemaps the curated catalogue (en_US-lessac-mediumdefault, amy, hfc_female,de_DE-thorsten-medium) onto the worker protocol, andcreateSpeechPipelinechunks → synthesizes → decodes → enqueues into the Web Audio queue. Settings has an explicit Enable audio & preview button (downloads only on click) and the auto-read switch.Tests: 110 total, CI run #9 green. Pending the browser check in #11 — the sandbox cannot open the GUI or click the button.
Delivered: Piper worker, OPFS download, PCM decoding and the speech pipeline are shipping; fresh-download race handled in #31.