dankvoice: speak long answers as sequential sentence-sized requests

agent_end awaited one whole-answer synthesis; long answers hit the
harness 30s extension-handler timeout (handler timed out after 30000ms)
and the single frank-tts request was the stall. Port the built-in
speak-aloud vocalizer's utterance segmenter (fHe in dist/cli.js) so
segmentation matches the known-working stock path: [.!?…]-run
boundaries, abbreviation/decimal/inline-code guards, fenced code and
tables swallowed, markup cleaned. Play segment N to player exit before
synthesizing N+1 (audio never stacks); fire-and-forget the chain so
utterances outlive the handler timeout; a run token retires superseded
chains. DANKVOICE_MAX becomes a per-answer budget of whole segments;
stripForSpeech is gone. Refs #23 follow-up.
This commit is contained in:
Frank committed 2026-10-19 01:21:34 -07:00
1 parent edd7e0cf68
commit bcd52bb0f4
4 files changed
+457 -52

No files matched your search

+23
View File
@@ -12,6 +12,29 @@ timestamp: 2026-08-28
# Bundle Change Log
## 2026-10-19 — dankvoice: segmented sequential speech, copied from the bundle's vocalizer
Silent-answer incident follow-up: `agent_end` awaiting one whole-answer
synthesis hit the harness's 30 s extension-handler timeout
(`handler timed out after 30000ms`) on long answers, and the single frank-tts
request for the entire answer was the stall. Instead of inventing a heuristic,
ported the utterance-splitting state machine out of the built-in speak-aloud
vocalizer (minified class `fHe` in `dist/cli.js`): strong boundaries are
`[.!?…]+` runs followed by whitespace — `!!!!!`/`...` stay one cut — with
abbreviation and inline-code guards; `3.5`/`1,5` survive because a boundary
needs trailing whitespace; fenced code and tables swallow whole; headings and
bullets vanish, ordered markers speak their number ("1, "); links collapse to
labels, URLs to hosts, paths to basenames; run-ons break at commas or word
wraps before 280 chars. `speak()` now synthesizes segment N+1 only after
segment N's player exited — strictly sequential, audio never stacks — and
`agent_end`/`/say <text>` fire-and-forget a chain retired through a run token
by `/say stop`, disarming, or a newer utterance. `DANKVOICE_MAX` became a
per-answer budget of whole leading segments; the hand-rolled `stripForSpeech`
truncator is gone. No LLM "humanization" rewrite happens (the bundle's
`speech.enhanced` rewrites with the tiny/smol model; dankvoice speaks
mechanically cleaned text through the cloned voices). Tests: two new driver
scenarios plus two rewrites, 17/17 in `tests/dankvoice.bats`.
## 2026-10-18 — dankvoice: `/say` options menu with output-device routing (Refs #23)
Added `/say menu` (bare `/say` now opens it; `help` keeps the text listing), the