simplescreenrecorder-2025-01-12_18.24.20.mp4
This repository shows an example of how to interact with a Taproot cluster running Kokoro-TTS directly from the browser for absurdly fast end-to-end speech synthesis, delivering ready-to-play 48KHz audio to the browser in as little as 50 milliseconds.
This assumes you have node.js and python installed. For GPU usage, you will need to have a working CUDA toolkit.
If you don't have it already, you also need to install espeak-ng. The easiest way to do this is to install espeak-ng using your system's package manager (yum, apt, pacman). See here for complete instructions.
pip install taproot[uv,av,ws]This command also includes uv for speed (linux only), ws for websocket communication and av for audio codecs.
taproot install speech-synthesis:kokoro --optionalThis command also installs deepfilternet (libdf) for speech upsampling with the --optional flag.
Note: deepfilternet requires rust on Python 3.12 and up.
git clone git@github.com:painebenjamin/taproot-kokoro-demo.git
See the green "Code" button in this repository for alternative clone commands.
cd taproot-kokoro-demo
npm install
In the taproot-kokoro-demo repository, run node like so:
npm start
In another window, run Taproot like so:
taproot overseer ws://127.0.0.1:32189 --local --executor-protocol wsYou can now access the demo at http://localhost:3000.