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

@prabhjeet.me/wakeywakey

v2.2.1

Published

This project implements a sophisticated, multi-stage Audio Intelligence Pipeline designed to detect specific "Wake Words" (e.g., "Hey Jarvis") directly within a web browser. By leveraging ONNX Runtime Web, the system performs high-performance machine lear

Readme

WakeyWakey

This project implements a sophisticated, multi-stage Audio Intelligence Pipeline designed to detect specific "Wake Words" (e.g., "Hey Jarvis") directly within a web browser. By leveraging ONNX Runtime Web, the system performs high-performance machine learning inference locally on the user's device, ensuring low latency and enhanced privacy.

Usage

// app.config.ts
provideWakeyWakey({
  audio: {
    gain: 1, // audio gain
    path: {
      upSound: './sounds/up.mp3',   // path sound to play when wakeword is detected
      downSound: './sounds/down.mp3',   // path sound to play when silence is emitted
    },
    silenceDuration: 1500 // in ms, wait after silence is detected
    vadThreshold: 0.5 // 0-1, threshold above which voice activity is considered
  },
  orb: {
    size: 400,  // orb size
  },
  onnx: {
    runtimePath: '/ort/',   // onnx runtime directory
    wakewordInferenceThreshold: 0.5 // classification score threshold to consider wakeword
    model: {
      melspectrogram: './models/melspectrogram.onnx',
      embedding: './models/embedding_model.onnx',
      silero_vad: './models/silero_vad_v4.onnx',
      wakeword: './models/hey_jarvis_v0.1.onnx',
    },
  },
}),
<!-- your-component.html -->
<wakeywakey
  (speech)="speech($event)"
  (exception)="exception($event)"
  (wakeword)="wakeword($event)"
  (ready)="ready()"
  (recording)="recording()"
  (silence)="silence($event)"
></wakeywakey>
// angular.json "assets"
{
  "glob": "**/*",
  "input": "node_modules/onnxruntime-web/dist/",
  "output": "ort"
},
{
  "glob": "**/*",
  "input": "node_modules/@prabhjeet.me/wakeywakey/assets",
  "output": "."
}

WakeyWakey Component

Below is the list of items that are emitted by this library

  • (speech): Fires every 8ms (for 16KHz), contains VAD score, 1280 frames sample, decibel etc
  • (exception): Fires when an exception is thrown
  • (wakeword): Fires when wakeword is detected, contains chunk (spoken samples), inference score etc
  • (ready): Fires when library is ready
  • (recording): Fires when recording is started after wakeword is detected
  • (silence): Fires when silence is detected after recording starts

Core Architecture

The system processes raw audio through a three-tier "Deep Learning" stack:

Signal Processing (Acoustic Analysis)

Converts raw 1D audio samples into a Mel-Spectrogram. This transforms sound into a time-frequency heat map, normalizing the data to highlight the features most relevant to human speech.

Feature Extraction (Neural Embeddings)

Uses a Sliding Window approach (76 frames per window) to analyze the spectrogram. A dedicated embedding model compresses these complex visual patterns into dense 96-dimensional feature vectors that represent the "essence" of the audio snippet.

Sequence Classification (Temporal Analysis)

Maintains a rolling "memory" of the last 16 embeddings. A final classification model analyzes this temporal sequence to determine the probability of a wake word being spoken.

Key Technical Features

  • Real-Time Sliding Window: Processes audio in overlapping chunks (hops) to ensure no words are "cut in half" at the edge of a buffer.
  • Intelligent Debouncing: Includes a built-in throttle time and Buffer-Reset mechanism to prevent "double-firing" or multiple notifications for a single spoken phrase.
  • Browser-Native Performance: Optimized for the web using TypedArrays (Float32Array) and Tensor operations, minimizing the overhead of the JavaScript garbage collector.
  • Edge AI Design: By running models locally via onnxruntime-web, the project eliminates the need for expensive server-side audio processing and functions entirely offline.

Technical Stack

  • Framework: Angular (Injectable Service Architecture).
  • Inference Engine: ONNX Runtime Web.
  • Data Processing: NumPy-style array manipulation in TypeScript.
  • Models: Specialized Mel-Spectrogram, Embedding, and Wake-word Classifier models.

OpenWakeWord

Special thanks to openWakeWord for the inspiration of this project. This project works on the architecture similar to openWakeWord.