MVP acceptance: a completed turn is spoken by Piper #11

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

Goal

M1 is done only when the whole path is demonstrated on a real browser and the host budget is proven unchanged — not when the units pass.

Scope

  • With a fresh profile install, enable the plugin, download one Piper voice, unlock audio, complete an agent turn → speech plays automatically.
  • Run the manual checklist subset: normal turn, long turn (>2 min), code-heavy turn, interrupted turn, second turn queues, stop mid-sentence, reload persistence, no double-speak on reload.
  • Measure and record: turn-end → first-audio latency; peak client memory (performance.memory or DevTools); host RSS before enable / during speech / after (ps -o rss= -p $(pgrep -f 'dsh web')).
  • Attach: screenshot of the settings page, console capture of the capture event (length only, not text), a short screen recording of a spoken reply.
  • File follow-up bugs as labeled issues; do not leave findings in comments.

Acceptance

  • All checklist rows pass in at least Chrome desktop; failures are filed, not hand-waved.
  • Host RSS delta attributable to the plugin is 0 within noise; no synthesis request reaches the host.
  • The demo the operator asked for ("make you speak") exists as evidence on this issue.

Notes

## Goal M1 is done only when the whole path is demonstrated on a real browser and the host budget is proven unchanged — not when the units pass. ## Scope - [ ] With a fresh profile install, enable the plugin, download one Piper voice, unlock audio, complete an agent turn → speech plays automatically. - [ ] Run the manual checklist subset: normal turn, long turn (>2 min), code-heavy turn, interrupted turn, second turn queues, stop mid-sentence, reload persistence, no double-speak on reload. - [ ] Measure and record: turn-end → first-audio latency; peak client memory (`performance.memory` or DevTools); host RSS before enable / during speech / after (`ps -o rss= -p $(pgrep -f 'dsh web')`). - [ ] Attach: screenshot of the settings page, console capture of the capture event (length only, not text), a short screen recording of a spoken reply. - [ ] File follow-up bugs as labeled issues; do not leave findings in comments. ## Acceptance - All checklist rows pass in at least Chrome desktop; failures are filed, not hand-waved. - Host RSS delta attributable to the plugin is 0 within noise; no synthesis request reaches the host. - The demo the operator asked for ("make you speak") exists as evidence on this issue. ## Notes - Depends on #5, #6, #7, #8, #9, #10. Closes the M1 milestone.
Author
Owner

Ready for the first listen. Plugin is installed in the web profile (operator confirmed); bundle 3b8cab8 contains the embedded Piper worker.

Test steps:

  1. Hard-reload the DSH page (the client bundle changed).
  2. Settings → Whale Noises.
  3. Click Enable audio & preview. First run downloads ≈92 MB (voice 63 MB + phonemize 18 MB + ORT 10.6 MB) with a progress bar; then it speaks: "Hi! I'm your DeepSeek Harness. I hope you find the perfect voice for me."
  4. If that works: tick Read every completed reply, send a prompt, let the turn settle → it should speak automatically.
  5. Reload the page and preview again: the voice should be cached (no re-download).

Record here: browser, whether audio played, download time, console errors (if any), and host RSS before/during/after (ps -o rss= -p $(pgrep -f 'dsh web')). If it fails, paste the browser console error — the likely suspects are OPFS access, the ORT/phonemize CDN fetch, or worker startup.

**Ready for the first listen.** Plugin is installed in the `web` profile (operator confirmed); bundle `3b8cab8` contains the embedded Piper worker. Test steps: 1. Hard-reload the DSH page (the client bundle changed). 2. Settings → **Whale Noises**. 3. Click **Enable audio & preview**. First run downloads ≈92 MB (voice 63 MB + phonemize 18 MB + ORT 10.6 MB) with a progress bar; then it speaks: *"Hi! I'm your DeepSeek Harness. I hope you find the perfect voice for me."* 4. If that works: tick **Read every completed reply**, send a prompt, let the turn settle → it should speak automatically. 5. Reload the page and preview again: the voice should be cached (no re-download). Record here: browser, whether audio played, download time, console errors (if any), and host RSS before/during/after (`ps -o rss= -p $(pgrep -f 'dsh web')`). If it fails, paste the browser console error — the likely suspects are OPFS access, the ORT/phonemize CDN fetch, or worker startup.
Author
Owner

First test: download succeeded, no sound. The worker/OPFS path works; the silence is either synthesis (empty PCM), a suspended AudioContext, or scheduling.

Shipped diagnostics in a92840a + HEAD:

  • settings now shows Audio context, Queue, and last signal (samples + peak);
  • a silent/empty synthesis is no longer treated as success — it errors with the sample count and peak;
  • a suspended context raises a clear "Audio blocked by the browser" error;
  • new Test speaker (tone) button plays a 440 Hz tone through the same queue, isolating audio from Piper;
  • the preview awaits AudioContext.resume() and reports its state.

Asked the operator to hard-reload, play the tone, then preview, and report the diagnostics + console output.

First test: download succeeded, **no sound**. The worker/OPFS path works; the silence is either synthesis (empty PCM), a suspended AudioContext, or scheduling. Shipped diagnostics in `a92840a` + `HEAD`: - settings now shows **Audio context**, **Queue**, and **last signal** (samples + peak); - a silent/empty synthesis is no longer treated as success — it errors with the sample count and peak; - a suspended context raises a clear "Audio blocked by the browser" error; - new **Test speaker (tone)** button plays a 440 Hz tone through the same queue, isolating audio from Piper; - the preview awaits `AudioContext.resume()` and reports its state. Asked the operator to hard-reload, play the tone, then preview, and report the diagnostics + console output.
Author
Owner

First audio confirmed by the operator — preview and auto-read work. Two follow-ups found and fixed in HEAD:

  1. Voice switching did nothing. Root cause is the library: piper-tts-web@1.0.5 caches one TtsSession in TtsSession._instance, and constructing it with a new voiceId only rewrites the field — the loaded ONNX model stays the first voice. src/worker/session.js now resets the singleton when the requested voice changes, so the next predict() loads the new model.
  2. Auto-read could download a voice implicitly. It now checks isDownloaded(selected) first and refuses with a settings hint (rule 3: no silent downloads).

Also added silence/context diagnostics, a speaker tone test, and a Voice field in the diagnostics, to catch any remaining audio-path issues.

115 tests, CI green. Awaiting the operator's voice-switch check (select German → preview should download the German voice once, then speak German).

**First audio confirmed by the operator** — preview and auto-read work. Two follow-ups found and fixed in `HEAD`: 1. **Voice switching did nothing.** Root cause is the library: `piper-tts-web@1.0.5` caches one `TtsSession` in `TtsSession._instance`, and constructing it with a new `voiceId` only rewrites the field — the loaded ONNX model stays the first voice. `src/worker/session.js` now resets the singleton when the requested voice changes, so the next `predict()` loads the new model. 2. **Auto-read could download a voice implicitly.** It now checks `isDownloaded(selected)` first and refuses with a settings hint (rule 3: no silent downloads). Also added silence/context diagnostics, a speaker tone test, and a `Voice` field in the diagnostics, to catch any remaining audio-path issues. 115 tests, CI green. Awaiting the operator's voice-switch check (select German → preview should download the German voice once, then speak German).
Author
Owner

First audio confirmed by the operator (preview + auto-read).

Fixed in db450cf:

  • Voice switching did nothing — root cause is piper-tts-web@1.0.5 caching a singleton TtsSession in TtsSession._instance: constructing it with a new voiceId only rewrites the field, the loaded ONNX model stays the first voice. src/worker/session.js now drops the singleton when the requested voice changes, so the next predict() loads the new model.
  • Auto-read no longer downloads implicitly: it checks isDownloaded(selected) and refuses with a settings hint (rule 3).
  • Added a Voice field to diagnostics + a speaker tone test.

115 tests, CI green. Operator to verify: select German, preview (downloads once), hear German.

First audio confirmed by the operator (preview + auto-read). Fixed in `db450cf`: - **Voice switching did nothing** — root cause is `piper-tts-web@1.0.5` caching a singleton `TtsSession` in `TtsSession._instance`: constructing it with a new `voiceId` only rewrites the field, the loaded ONNX model stays the first voice. `src/worker/session.js` now drops the singleton when the requested voice changes, so the next `predict()` loads the new model. - **Auto-read no longer downloads implicitly**: it checks `isDownloaded(selected)` and refuses with a settings hint (rule 3). - Added a `Voice` field to diagnostics + a speaker tone test. 115 tests, CI green. Operator to verify: select German, preview (downloads once), hear German.
Author
Owner

Met: completed turns are spoken end-to-end with Piper, and manual/auto/tool speech paths are all in use.

Met: completed turns are spoken end-to-end with Piper, and manual/auto/tool speech paths are all in use.
dsh closed this issue 2026-11-06 04:36:04 +00:00
Sign in to join this conversation.
No description provided.