@degreesign/voice

Offline speech for the web and Node.js

Speech that stays on your device.

Speech to text, text to speech and voice cloning in one typed package. Whisper and MOSS run locally, with no account and no cloud after setup.

MIT runtime · Apache-2.0 weights · WebAssembly SIMD

whisper base / listening local

Every word stays on this device.

16 kHz mono streaming
2 directions
20 TTS languages
48 kHz voice output
0 cloud calls

Capabilities

Two directions. One small package.

The same entry handles recognition and synthesis. Models download once, then every decode runs on the machine in front of you.

Speech to text

Stream a live transcript from the microphone, a file, a URL or raw PCM. Whisper base runs locally with automatic language detection.

streaming word timing

Text to speech

Render two 48 kHz MOSS voices with pitch, rate, gain, temperature and seed controls. The text selects one of 20 languages.

48 kHz 20 languages

Voice cloning

Record three seconds, encode it with the MOSS tokenizer and reuse the codes as a speaking reference. No second recording needed.

3 s reference 45 MB encoder

Dictation

A headless controller owns the worker, microphone capture, pause state and partial text. Bring your own markup and copy.

worker partials

Any audio

Accept 16 kHz PCM, a Blob or File, a URL, a Node filesystem path or the live microphone. WAV, FLAC and MP3 decode in Node.

PCM WAV / FLAC / MP3

Local first

Weights download once into IndexedDB or the disk cache. Resumable Range downloads, a 512 MB budget and no account.

IndexedDB resumable

How it works

From air to text, from text to air.

One entry point chooses the right model, source and platform. The heavy work stays in WebAssembly on the CPU.

01

Capture

Microphone, PCM, Blob, URL or path. The first source present wins, so the same API fits a page, a worker or a Node script.

02

Decode

Whisper base streams through SIMD kernels with bounded memory, live partial text and decode timing measured over the model alone.

03

Speak

MOSS renders 48 kHz audio, optionally with a recorded reference and pitch, rate or gain changes applied after synthesis.

Live demo

Try it in the browser.

Record, transcribe, speak and clone a voice. The first run downloads the model you pick.

Speech to text

Whisper base runs locally. The demo uses Quality.Low, a 59 MB download on first use. Record from the microphone.

Ready.

Transcribe file

Pick an audio file and transcribe it with the same local Whisper base model. The first run downloads 59 MB.

Ready.

Text to speech

Pick a voice, tune the sliders and press Speak. The first run downloads the voice and keeps it cached. Pitch and rate apply after synthesis. Temperature and seed only affect the MOSS voices.

Ready.

Voice cloning

Record a short reference from the microphone. Replay it in the player below. The first run downloads the 45 MB MOSS encoder. The recording joins the voice list as Cloned Voice, ready for the next Speak.

No reference recorded.

Case study

DoListy logo DoListy

Task capture stays private.

DoListy is a to-do list with no signup and a privacy-first design. It uses @degreesign/voice for task dictation and voice notes, so spoken tasks become text on the device.

  • Dictate Speak a task and watch the live partial text appear.
  • Stay local Audio and text stay in the browser. No account, no upload.
  • Reuse One controller drives the microphone, worker and pause state.
Visit DoListy Designed by DegreeSign
DoListy new task with live dictation active
New task, dictation in progress.
DoListy task list with the transcribed task saved
Transcribed and saved on device.

Screenshots from dolisty.com

Models

Small enough to ship, sharp enough to use.

Pick a quality for the download you can afford. Quantized weights dequantize once, then share the same decode path.

Whisper base

speech to text
Quality Weights Size
High F16 151 MB
Medium Q8_0 85 MB
Low Q4_K_M 59 MB

Multilingual by default. Set Language.en for the English only base.en checkpoint at the same sizes.

MOSS TTS Nano

text to speech
Voice Id Output
Female female 48 kHz
Male male 48 kHz

About 133 MB per voice. The clone encoder adds 45 MB and stays resident after the first use.

Architecture

Every call has a place.

Trace the package from the public entry through the model family, the tensor runtime, the platform stores and the audio input. The full map is one offline HTML file with a panel for following a call.

  • 01 Public entry and typed API
  • 02 Whisper and MOSS model families
  • 03 WebAssembly kernels and tensor cache
  • 04 Cache, storage and audio input
Open the full architecture

Opens in a new tab. One self-contained HTML file. Browse the source .

code structure full map
Public entry transcribe / synthesize / cloneVoice
Model family Whisper base / MOSS TTS Nano
Tensor runtime WebAssembly SIMD / F32 cache
Platform stores @degreesign/cache / @degreesign/storage
Audio input microphone / file / URL / PCM
Open full architecture

Install

Add it to your project.

One package for both directions. Node 24 or newer, or load the browser bundle straight from a CDN.

npm install @degreesign/voice

The dictation controller lives at @degreesign/voice/dictation.

import {
    Language,
    transcribe,
} from "@degreesign/voice";

const session = transcribe({
    language: Language.auto,
});
const result = await session.done;

console.log(result.text, result.meta.rtf);