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

@broberg/speech-dictionary

v0.1.3

Published

Fleet STT vocabulary + correction primitive — terms[] for WhisperKit-style prompt-biasing, corrections{} for post-transcription fixup. Seeded from the fleet's real dev-jargon mishear list.

Downloads

1,194

Readme

@broberg/speech-dictionary

Fleet STT vocabulary + correction primitive — a shared dictionary any Whisper-family transcription feature can pull in, instead of every repo hand-rolling its own term list that drifts.

npm i @broberg/speech-dictionary

Two real consumers today: Trail's on-device WhisperKit ambient-STT (F201.6) and cardmem's interview module (F185) both mishear the same fleet proper nouns and dev-jargon — this package is seeded from the fleet's real, previously-loose ordbog.txt mishear list plus cardmem's authored proper-noun set.

Two datasets, two jobs

import { terms, corrections, toInitialPrompt, applyCorrections } from "@broberg/speech-dictionary";

// PRE-transcription: bias WhisperKit's initialPrompt toward fleet proper nouns
toInitialPrompt({ groups: ["product", "tech"], maxTerms: 20 });
// → "cardmem, buddy, Trail, ..., WhisperKit, Fly.io, ..."

// POST-transcription: fix known dev-jargon mishears in the raw transcript
applyCorrections("jeg lavede en kommitte og fixede en bog i søveren");
// → "jeg lavede en committe og fixede en bog i serveren"
  • terms() / toInitialPrompt() — 40 fleet proper nouns (products, people, brands, tech), grouped so a caller can bias toward just what's relevant (groups: ["product"]) and cap the list to fit a model's prompt budget (maxTerms).
  • corrections() / applyCorrections() — 55 real Danish/English dev-jargon mishears ("kommitte" → "committe", "søver" → "server"), parsed verbatim from the fleet's own ordbog.txt.

Cross-stack: raw JSON, not just a JS API

data/terms.json and data/corrections.json ship as raw files in the npm tarball (not just bundled into dist/), so a non-JS consumer — e.g. a Swift build step bundling WhisperKit resources on-device — can read them directly from node_modules/@broberg/speech-dictionary/data/*.json with no Node/JS runtime involved. The TS/JS wrapper in this README is for JS/TS consumers (cardmem, Trail's Bun engine); Swift consumers read the JSON directly.

Unicode-aware correction (why this mattered)

applyCorrections does not use JavaScript's default \b word-boundary — \b only treats [A-Za-z0-9_] as word characters, so \bsøver\b silently never matches "søver" in real Danish text (æ/ø/å fall outside \b's definition of a word character). This package uses a Unicode-letter-aware boundary instead, so Danish terms correct properly. Longest-wrong-term-first ordering avoids one correction partially clobbering another (e.g. "komitte" and "kommitte" both resolve correctly to "committe").

Extending with your own vocabulary

import { extend } from "@broberg/speech-dictionary";

const mine = extend({
  terms: [{ term: "fd-sundhed", group: "product" }],
  corrections: [{ wrong: "fysjo", right: "fysio" }],
});

mine.applyCorrections("fysjo klinik"); // → "fysio klinik"

extend() returns a fresh bound API layered on top of the fleet base — it never mutates shared state, so concurrent callers with different custom vocabularies don't interfere with each other.