npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sidevoice/engine

v0.15.0

Published

Sidevoice engine for the web: local voice models in the browser, as WebAssembly.

Readme

@sidevoice/engine

The Sidevoice engine for the web: it knows a catalogue of local voice models, works out which build of each fits the device, and takes the chosen one from absent to ready. This package is its WebAssembly build (wasm-bindgen --target web).

import init, { WebEngine } from "@sidevoice/engine";

await init();
// The page says what it has; the engine keeps its files in OPFS and downloads them with fetch.
const engine = await WebEngine.create({
  async capabilities() {
    return { os: "web", arch: "wasm32", accelerators: navigator.gpu ? ["webgpu", "wasm"] : ["wasm"] };
  },
  credential(provider) { // optional: a remote provider's key ("openai", "elevenlabs"), or null
    return localStorage.getItem(`key:${provider}`);
  },
});
const local = engine.localCatalog();
const models = await local.models(); // LocalModelInfo[]: each with its builds ranked, whether it is installed, lastUsedAt
const whisper = await engine.load("whisper-small", undefined, (progress) => show(progress), abort.signal);
const stt = whisper.asStt();
const text = await stt.transcribe(samples, 48000, "es"); // any rate: the engine resamples
const kokoro = await engine.load("kokoro-82m-v1.0");
const { samples: speech, sampleRate } = await kokoro.asTts().speak("Hola", "ef_dora", "es");
const silero = await engine.load("silero-vad");
const mic = await silero.asVad().stream({ minSilenceMs: 500 }); // a state of its own; mic.sampleRate is 16000
const { frames, events } = await mic.accept(pcm); // events: { type: "speech-start", at } | { type: "speech-end", start, end }
const smartTurn = await engine.load("smart-turn-v3.2");
const p = await smartTurn.asEndOfTurn().probability(turnSoFar, 48000); // the probability the speaker has finished
stt.free(); // the model leaves memory once its LocalModel and the Stt and Tts it handed out are freed
whisper.free(); // (or collected)

// Every catalogue alike: "local", then each remote provider, listed live with the app's keys, kept in memory only.
for (const catalog of engine.catalogs()) {
  const { reason, stale, detail } = await catalog.status(); // reason absent when current
  const speakers = await catalog.models("tts"); // each { id, capabilities, languages, voices, speed? }, and its own fields
}
const elevenlabs = engine.remoteCatalog("elevenlabs");
await elevenlabs.refresh(); // read again now
const scribe = await elevenlabs.load("scribe_v2"); // a RemoteModel: the same asStt(), asTts()
const heard = await scribe.asStt().transcribe(samples, 48000, "es");

Every promise rejects with an Error carrying the engine's stable code and its params, for the page to translate. Models run through transformers.js, a dependency of this package that the engine imports only when a model is loaded; Kokoro's phonemes come from eSpeak NG (the espeak-ng package), under the GPL-3.0-or-later: see THIRD_PARTY_NOTICES.md.

Source, documentation and issues: https://github.com/sidevoice/sidevoice-engine

Apache-2.0. Sidevoice is a trademark; see TRADEMARKS.md in the repository.