Skip to content

About

wasm up some speech with cactus and bark!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

speakingwasm

Local speech and structured translation requests in a static page.

bun install
bun run build
bun start

Deploy dist/ at any path on HTTPS. Models load only after an action, from pinned Hugging Face revisions, and remain in the browser's download cache. Close or cancel releases the inference worker. Clear downloads removes the persistent model cache.

For an entirely self-hosted deployment, run bun run models before building. Pass model names to fetch a subset: bun run models whistle paradee. Serve the complete dist with ordinary static hosting; microphone capture requires HTTPS or localhost.

Modes

  • Speak: Paradee 1.3 INT8 (8.5 MB, embedded voices) or full Kokoro 82M FP32 (326 MB plus the selected 522 KB voice). English, Spanish, French, Hindi, Italian and Portuguese text phonemization; all Kokoro voices are available with model-native phoneme input, including Japanese and Chinese. The pinned eSpeak/Misaki fallback runs locally. WAV playback, seeking and download.
  • Listen: Whistle (17 MB, seven languages, incremental transcription), or Bark 3.0 Base / Plus / Clean (685 MB INT8 each, English, phrase updates). Microphone waveform, streaming text, Copy, Save and transfer to the translation pane. WAV, MP3, M4A and FLAC decode incrementally through browser codecs, with a lazy FFmpeg WASM fallback for unsupported codecs. No file-size cutoff. Quiet-boundary segmentation bounds inference memory independently of recording length.
  • Translate request: Needle 3 selects the translate tool for the source and target you choose. The editable pre-prompt and document reference go to Needle; the page attaches your original text or Markdown unchanged to the accepted request. Detect and All languages are preserved as options for the recipient. Copy or export the JSON for a translator; Needle does not translate the document itself.

Embed

Import speech/speech.js from the built tree. SpeechEngine.load(name, options) starts one worker; call('speak', {text}) returns PCM, call('transcribe', {pcm, stream}) accepts mono 16 kHz PCM, and close() releases it. speech/microphone.js supplies capture and waveform helpers. Copy the complete speech/ directory, preserving its relative paths. One engine owner per operation keeps inactive models out of memory.

models.json pins source revisions; assets.lock.json pins every downloadable asset and its SHA-256. bun run models verifies checksums when materializing local assets. The browser validates sizes and uses immutable revision URLs as cache keys. Source attribution are listed in credits/.

AGPL-3.0 standalone page project. Visit the github page under tts.shel.sh - Source revision under fsharp multi-project orchestrator: /tree/main/tts

About

wasm up some speech with cactus and bark!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages