Download the model on first use instead of shipping it #2

Merged
kglitchy merged 1 commit from worktree-model-download into main 2026-10-16 22:56:45 +00:00
Owner

The 326 MB model kept the Firefox package over addons.mozilla.org's 200 MB
limit. It now lives in bumbleforge's package registry, under a version named
after its SHA-256; tts/model.js downloads it on first use (resuming dropped
connections), checks the hash and keeps it in IndexedDB. The floating player
shows the download's progress.

  • tools/export_kokoro.py exports only the model, to build/model.onnx; the
    new tools/export_voices.py writes the voices and vocabulary.
  • make upload-model builds the model if needed, uploads it unless that
    version exists, and writes tts/model.json. make pack-firefox writes the
    package for addons.mozilla.org to build/ (about 42 MB).
  • Chrome: the offscreen document is also made for WORKERS so Chrome doesn't
    close it mid-download, and has the service worker close it after 30 s
    idle instead.
  • Firefox: keepalive also runs while the model downloads.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

The 326 MB model kept the Firefox package over addons.mozilla.org's 200 MB limit. It now lives in bumbleforge's package registry, under a version named after its SHA-256; tts/model.js downloads it on first use (resuming dropped connections), checks the hash and keeps it in IndexedDB. The floating player shows the download's progress. - tools/export_kokoro.py exports only the model, to build/model.onnx; the new tools/export_voices.py writes the voices and vocabulary. - make upload-model builds the model if needed, uploads it unless that version exists, and writes tts/model.json. make pack-firefox writes the package for addons.mozilla.org to build/ (about 42 MB). - Chrome: the offscreen document is also made for WORKERS so Chrome doesn't close it mid-download, and has the service worker close it after 30 s idle instead. - Firefox: keepalive also runs while the model downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 326 MB model kept the Firefox package over addons.mozilla.org's 200 MB
limit. It now lives in bumbleforge's package registry, under a version named
after its SHA-256; tts/model.js downloads it on first use (resuming dropped
connections), checks the hash and keeps it in IndexedDB. The floating player
shows the download's progress.

- tools/export_kokoro.py exports only the model, to build/model.onnx; the
  new tools/export_voices.py writes the voices and vocabulary.
- make upload-model builds the model if needed, uploads it unless that
  version exists, and writes tts/model.json. make pack-firefox writes the
  package for addons.mozilla.org to build/ (about 42 MB).
- Chrome: the offscreen document is also made for WORKERS so Chrome doesn't
  close it mid-download, and has the service worker close it after 30 s
  idle instead.
- Firefox: keepalive also runs while the model downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kglitchy force-pushed worktree-model-download from cb3b290085 to 5fafa22ad8 2026-10-16 22:56:03 +00:00 Compare
kglitchy deleted branch worktree-model-download 2026-10-16 22:56:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kglitchy/speak-it!2
No description provided.