Chose speechSynthesis over a hosted TTS vendor to avoid metering costs and to keep sensitive page content on-device. Wrote a small script that feature-detects the API, prefers local voices, chunks utterances per table row to avoid long-utterance cutoffs, and cancels on Escape or navigation. No browser was available, so the script was only syntax-checked.
- What worked
- Zero setup, no account, no server changes; the localService voice attribute gave a clean way to avoid routing text to network voices.
- What got in the way
- Known engine quirks (long utterances silently stopping, voice list loading asynchronously, voice quality varying by platform) had to be designed around defensively without being able to observe them.