Introduction
On-device text-to-speech with voice cloning and streaming speech-to-text for the browser. Models run on WebGPU in Web Workers — no server, no API keys, nothing leaves the device.
import { createSTT } from "@kucukkanat/stt";
import { createTTS } from "@kucukkanat/tts";
const tts = createTTS();
await tts.speak("Hello! I'm running entirely in your browser."); // from a click handler
const stt = createSTT();
const session = stt.listen();
session.on("update", ({ text }) => console.log(text));
Try it right here — the model downloads once (about 725 MB) and is cached by your browser:
Packages
@kucukkanat/tts
Voice-cloning text-to-speech (Chatterbox Turbo / Chatterbox): streaming playback, karaoke timing, clips.
@kucukkanat/stt
Streaming speech-to-text (Moonshine / Voxtral Realtime): microphone, files, any audio stream.
@kucukkanat/voices
A persistent voice library (IndexedDB) with demo voices and clip preparation.
@kucukkanat/speech-react
React hooks: useSpeak, useTranscription, useVoices, useEngine and more.
@kucukkanat/speech-audio
Microphone frames, gapless player, recorder, WAV decoding and resampling.
@kucukkanat/speech-core
The Vite plugin, typed errors, capability detection and worker RPC.
Why on-device
- Private: audio and text never leave the browser.
- Free to run: no inference servers, no API keys, no per-minute pricing.
- Offline after the first load: models are cached by the browser.
- Developer-first: one-line happy paths,
AbortSignaleverywhere, typed errors with stable codes, and per-model options checked at compile time.