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

@hyssostech/voskspeech-plugin

v0.1.0-alpha.0

Published

Vosk offline speech recognition plugin for Sketch-thru-Plan. Runs entirely in-browser via WebAssembly using a domain-adapted Kaldi model.

Downloads

35

Readme

STP Plugin: Vosk Offline Speech

The Sketch-thru-Plan (STP) recognizer can employ transcribed speech generated by potentially different recognizers. To promote code reuse and make it possible to more easily swap recognizers, the functionality should be packaged as a plugin that conforms to a well-known interface.

This plugin is implemented based on Vosk WebAssembly, providing offline speech recognition that runs entirely in the browser. No cloud service, API keys, or network connection is required — a domain-adapted Kaldi model optimized for military planning vocabulary is included with the plugin and deployed alongside the application.

Prerequisites

This plugin requires a Vosk speech model to be served as static files alongside your application. A domain-adapted model is included at model/vosk-model-la-domain.zip (~28 MB).

Setting up the model

Extract the model into your application's directory:

# PowerShell (Windows)
Expand-Archive -Path plugins/speech/voskspeech-plugin/model/vosk-model-la-domain.zip -DestinationPath your-app/model

# bash / macOS / Linux
unzip plugins/speech/voskspeech-plugin/model/vosk-model-la-domain.zip -d your-app/model

The resulting model/ directory (~50 MB on disk) contains the acoustic model, decoding graph, and configuration files required by the Vosk WASM runtime.

Note: The page must be served over HTTPS for microphone access. Modern browsers also require AudioWorklet (Chrome 66+, Firefox 76+, Safari 14.1+, Edge 79+) and WebAssembly support.

Accessing the plugin functionality

The plugin requires two separate scripts: the Vosk WASM runtime and the plugin bundle itself. The Vosk runtime (vosk-browser) is not bundled into the plugin — it is loaded separately so the browser can cache the large WASM module independently.

Copy vosk.js from node_modules/vosk-browser/dist/vosk.js into your app directory, then reference both scripts:

<!-- Vosk WASM runtime (exposes global `Vosk`) — must be loaded first -->
<script type="application/javascript" src="vosk.js"></script>
<!-- Vosk speech plugin (exposes global `StpVS`) -->
<script type="application/javascript" src="stpvoskspeech-bundle-min.js"></script>

The vosk-processor.js AudioWorklet file must also be accessible from your application — it is loaded at runtime by the plugin. By default it is expected in the same directory as the page; use the workletPath constructor parameter to specify an alternate location.

Referencing the plugin

The plugin is built as a UMD library, and is therefore compatible with plain vanilla (IIFE), AMD and CommonJS. Also included is an ESM bundle (stpvoskspeech-bundle.esm.js).

When used in vanilla javascript, an StpVS exported global can be used to access the plugin types:

const speechreco = new StpVS.VoskSpeechRecognizer();

If the model is served from a non-default location, or the AudioWorklet file is in a different directory, pass the paths to the constructor:

// VoskSpeechRecognizer(modelPath?, sampleRate?, workletPath?)
const speechreco = new StpVS.VoskSpeechRecognizer('./my-models/vosk-model-la-domain', 16000, './lib/vosk-processor.js');

Model loading begins eagerly in the background as soon as the recognizer is created.

Examples

  • The basic sample supports selection of Vosk alongside Azure and AWS speech plugins at runtime via a dropdown control

Building the project

The repository includes a pre-built dist folder that can be used directly for testing. If changes are made to the plugin and there is a need to rebuild, run:

npm install
npm run build

Documentation

See the speech plugins overview for details on the ISpeechRecognizer interface, recognition strategies, and event handling.