Skip to content
Speech SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

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

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, AbortSignal everywhere, typed errors with stable codes, and per-model options checked at compile time.

Was this page helpful?