phonon
Generates speech in the browser and provides start and end times for each word.
What does it do?
Load the model on a page, then generate speech from text. It provides each word's start and end times, allowing an interface to highlight words in sequence during playback. It uses a WebGPU adapter when the browser has one and falls back to CPU execution in a worker otherwise. The model file is downloaded on the first run and read from the browser cache afterward. It also supports a larger 40M model, but the original text states that commercial use of that model is not permitted.
Key features
- Synthesize speech from text in the browser
- Provide start and end times for each word
- Provide a callback for highlighting words during speech output
- Run in a CPU worker when WebGPU is unavailable
- Read model files from the browser cache after the first download