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

moonshine-node

v1.1.0

Published

On-device speech-to-text CLI for Node.js using Moonshine models

Readme

Moonshine Node

On-device speech-to-text CLI for Node.js using Moonshine models.

Features

  • Real-time transcription - Speech-to-text with automatic voice activity detection
  • File transcription - Transcribe WAV files directly from the CLI
  • On-device processing - No data leaves your machine
  • Multiple models - Choose between tiny (faster) or base (more accurate) models
  • Streaming mode - Get partial transcriptions as you speak
  • Linux audio support - Uses ALSA via @mastra/node-audio

Installation

npm install

Usage

# Basic usage (tiny model)
npx moonshine-node

# Transcribe a WAV file
npx moonshine-node --file audio.wav

# Use base model for better accuracy
npx moonshine-node --model base

# Transcribe one sentence and exit
npx moonshine-node --once

# Enable streaming/partial updates
npx moonshine-node --streaming

# Specify audio device (Linux/ALSA)
npx moonshine-node --device "sysdefault:CARD=Mini"

# List available audio devices
npx moonshine-node --list-devices

# Verbose output
npx moonshine-node --verbose

Options

| Option | Description | Default | | ---------------- | ---------------------------------- | --------- | | --help | Show help message | - | | --list-devices | List available audio input devices | - | | --file | WAV file to transcribe | - | | --device | ALSA device name | default | | --model | Model to use (tiny or base) | tiny | | --streaming | Enable streaming/partial updates | false | | --once | Transcribe one sentence and exit | false | | --verbose | Show detailed logs | false |

Controls

  • Press q or Ctrl+C to quit

Models

  • tiny (~14MB) - Faster, lower accuracy. Good for simple commands.
  • base (~45MB) - Slower, better accuracy. Recommended for general use.

File Transcription

Transcribe WAV audio files directly:

npx moonshine-node --file audio.wav
npx moonshine-node --file audio.wav --model base

Supported format: 16-bit PCM WAV files (16kHz recommended, other sample rates are auto-resampled).

Requirements

  • Node.js 18+
  • Linux (for microphone input via ALSA)
  • arecord (ALSA utility) installed

Architecture

  • VAD: TEN VAD for voice activity detection
  • STT: Moonshine ONNX models for speech-to-text
  • Audio: @mastra/node-audio for microphone input
  • Runtime: onnxruntime-node for inference

License

MIT