Downloaded voices cannot be deleted (storage leak + missing edge cases) #29

Closed
opened 2026-10-31 00:01:33 +00:00 by dsh · 2 comments
Owner

Voices can be downloaded but not deleted. With ~30 MB per voice and a favourites list that only grows, this is an app-storage leak with a UI
debt on top.

What is missing

  • A delete action per downloaded voice.
  • Explicit cache purge (the M3 text already mentions "explicit model download/cache/purge" — if that covers this, close this as duplicate, it is the same code path).

Edge cases that need an answer before the button ships

  1. Voice is in favourites → remove from favourites silently, or warn?
  2. Voice is the active selection → what plays afterwards? Needs a defined fallback.
  3. Voice is the workspace default → does the workspace mapping fall back or break?
  4. Partial download / corrupt model asset → delete must work on that too, not only on "valid" entries.

Acceptance

Deleting a voice removes its bytes (verify with the storage figure in settings), and all four cases above have a defined, tested behaviour.


Note: raised because a download-only settings surface becomes a landfill and users cannot recover the space.

Voices can be downloaded but not deleted. With ~30 MB per voice and a favourites list that only grows, this is an app-storage leak with a UI debt on top. ## What is missing - A delete action per downloaded voice. - Explicit cache purge (the M3 text already mentions "explicit model download/cache/purge" — if that covers this, **close this as duplicate**, it is the same code path). ## Edge cases that need an answer before the button ships 1. Voice is in favourites → remove from favourites silently, or warn? 2. Voice is the **active** selection → what plays afterwards? Needs a defined fallback. 3. Voice is the workspace default → does the workspace mapping fall back or break? 4. Partial download / corrupt model asset → delete must work on that too, not only on "valid" entries. ## Acceptance Deleting a voice removes its bytes (verify with the storage figure in settings), and all four cases above have a defined, tested behaviour. --- *Note: raised because a download-only settings surface becomes a landfill and users cannot recover the space.*
Author
Owner

Agree — this should come before favourites. Notes from the engine internals:

  • Piper: piper-tts-web already exposes remove(voiceId); our worker protocol has REMOVE, but the adapter never calls it. Small change.
  • Kokoro: the worker REMOVE deletes the voice style; the 92 MB model is shared and should be a separate “delete model” action (purging the model while a voice is active needs the same fallback rules).
  • Phonon: no per-voice delete API. Voices are known URLs in phonon-tts-v1; deleting the cache entries by URL works. Model deletion needs clearCache() (all) or a scoped purge; offer “clear Phonon download” explicitly.
  • Partial/corrupt: delete by enumerating files for the id, ignore missing ones, and treat “no bytes found” as success. Never require a valid entry to free space.
  • Fallbacks I'd define: delete active → switch to that engine's default (if that is also gone → global default); delete a favourite/workspace mapping → remove it silently with a toast; never leave a dangling id that later crashes playback.
  • Storage figure: navigator.storage.estimate() is origin-wide, not plugin-only. Show it as “browser storage used by this origin” plus per-voice sizes; don't claim the number is only ours.

Small enough to do in one focused pass; it also gives the favourites UI a clean lifecycle to build on.

**Agree — this should come before favourites.** Notes from the engine internals: - **Piper**: `piper-tts-web` already exposes `remove(voiceId)`; our worker protocol has `REMOVE`, but the adapter never calls it. Small change. - **Kokoro**: the worker `REMOVE` deletes the voice style; the 92 MB model is shared and should be a separate “delete model” action (purging the model while a voice is active needs the same fallback rules). - **Phonon**: no per-voice delete API. Voices are known URLs in `phonon-tts-v1`; deleting the cache entries by URL works. Model deletion needs `clearCache()` (all) or a scoped purge; offer “clear Phonon download” explicitly. - **Partial/corrupt**: delete by enumerating files for the id, ignore missing ones, and treat “no bytes found” as success. Never require a valid entry to free space. - **Fallbacks** I'd define: delete active → switch to that engine's default (if that is also gone → global default); delete a favourite/workspace mapping → remove it silently with a toast; never leave a dangling id that later crashes playback. - **Storage figure**: `navigator.storage.estimate()` is origin-wide, not plugin-only. Show it as “browser storage used by this origin” plus per-voice sizes; don't claim the number is only ours. Small enough to do in one focused pass; it also gives the favourites UI a clean lifecycle to build on.
Author
Owner

Delivered: per-voice delete, shared-model purge for LibriTTS/Phonon, active-voice fallback and storage estimate; favourites/chat cleanup landed with #28.

Delivered: per-voice delete, shared-model purge for LibriTTS/Phonon, active-voice fallback and storage estimate; favourites/chat cleanup landed with #28.
dsh closed this issue 2026-11-06 04:36:08 +00:00
Sign in to join this conversation.
No description provided.