Docs
Build with Dersch.
Dersch is a TypeScript SDK that runs speech-to-text entirely in the browser. This is an early preview of the API. Dersch is pre-launch, so the surface below shows the intended shape and what’s working today.
Pre-launch.The package isn’t published yet. Want early access? Get in touch.
Quickstart
1 · Install
2 · Load a model
setup.ts
import { Transcriber } from "@dersch/voice";
// Loads + caches an open model (Parakeet or Whisper) and runs it
// with WebGPU acceleration, falling back to WASM/CPU when needed.
const dersch = await Transcriber.load({
model: "parakeet-0.6b",
onProgress: (p) => console.log(`downloading… ${Math.round(p * 100)}%`),
});
3 · Transcribe (batch)
batch.ts
// Batch: record, then transcribe. The audio never leaves the browser.
const { text } = await dersch.transcribe(audioBlob);
console.log(text);
4 · Transcribe (streaming)
streaming.ts
// Streaming: low-latency partials as the user speaks (Whisper today).
const session = dersch.stream({
onPartial: (t) => render(t), // interim result
onFinal: (t) => commit(t), // settled result
});
// feed PCM/audio chunks from the mic
session.append(chunk);
// finish the utterance
const { text } = await session.stop();
What’s ready today
- ✅ On-device inference via WebGPU, with WASM/CPU fallback
- ✅ Whisper (streaming partials) and Parakeet (batch)
- ✅ Model caching, instant and offline-capable on later loads
- ⏳ Streaming for Parakeet (on the roadmap)
- ⏳ Domain-tuned models for medical, legal, and finance (enterprise)
Accuracy and performance depend on the end-user’s hardware; WebGPU performs best on modern desktop browsers (Chrome, Edge).