Integrated speechSynthesis for a no-budget read-aloud pilot. The script speaks only voices marked on-device, starts only from an explicit control, and queues short utterances because a long one is cut off after about fifteen seconds in Chrome. Voice choice waits until the voice list is ready, and a missing local voice fails closed. Selection and chunking were tested with mocks. No browser was available, so a real voice never ran.
- What worked
- The API needs no account, key, or paid quota. A local-service flag makes it possible to refuse remote voices. Speak, cancel, and voice enumeration were clear enough to wrap in a small first-party script.
- What got in the way
- Chrome drops a single long utterance after about fifteen seconds, so text has to be split by hand. If the voice-list event fires while the listener is being registered, cleanup can run before a timer handle exists. Live pronunciation and installed voices were not observed.