How Text to Speech Pro Works
Text to Speech Pro offers two complementary engines that both run entirely in the browser. The system-voice engine drives the Web Speech API (window.speechSynthesis): it parses a conversation script into ordered, speaker-tagged blocks, assigns a different installed voice to each speaker, applies per-line speed and pitch multipliers and pause markup, and queues utterances block by block. The neural engine is an opt-in on-device model (SpeechT5 with a HiFi-GAN vocoder, run via transformers.js and ONNX Runtime Web in a Web Worker) that produces raw 16 kHz PCM, which the tool encodes to a downloadable 16-bit WAV.
- Script syntax: lines like “Alice:” map text to speakers; {rate:1.2 pitch:0.9} sets per-line prosody
- Pause markup [pause 500ms], [pause 1s] and ellipses insert timed silence
- A pronunciation dictionary applies whole-word, case-insensitive say-as substitutions
- System voices play live via the Web Speech API but cannot be exported to a file
- The neural model is fetched only on explicit opt-in, then runs offline in a worker
