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

react-native-openwakeword

v3.1.0

Published

High-performance, offline wake word detection for React Native built with Nitro. Cross-platform (iOS/Android) and powered by openWakeWord.

Readme

react-native-openwakeword

Fully offline, on-device wake word detection for React Native.

Run openWakeWord models directly on iOS and Android with TensorFlow Lite, C++, and Nitro JSI. An open-source alternative to cloud wake word APIs and proprietary SDKs like Picovoice Porcupine and DaVoice.

CI Version Platform Downloads License

⭐ We're on our way to 50 stars!
If react-native-openwakeword is useful to you, star the repo and help us get there. It take 2 seconds!

The Problem

Building wake word detection in React Native often means choosing between cloud services or proprietary SDKs:

  • Picovoice Porcupine: A commercial, proprietary wake word SDK with its own model and licensing ecosystem.
  • DaVoice: A third-party React Native wake word solution with its own commercial licensing and implementation.

react-native-openwakeword provides an open-source alternative: run openWakeWord models directly on iOS and Android with TensorFlow Lite, C++, and Nitro JSI.

This provides full access to the open model ecosystem under a permissive open-source license without third-party commercial blockers.

Wake Word Detection Comparison

| Requirement | Picovoice Porcupine | DaVoice | react-native-openwakeword | | :--- | :--- | :--- | :--- | | Offline inference | ✔️ | ✔️️ | ✔️ | | Open source | ❌ | ❌ | ✔️ Apache-2.0 | | Commercial license required | Yes | Yes | ❌ None | | Bring your own .tflite models | ❌ | ❌ | ✔️ | | Custom wake word models | Restricted | Managed request | ✔️ Compatible .tflite models | | Cloud dependency | Optional | Managed | ❌ None | | API key / account | Required | Required | ❌ None | | React Native | ✔️ | ✔️ | ✔️ |

Performance

Built with a streaming C++ pipeline and fixed ring buffers, designed to stay safely below real-time audio constraints.

Tested on a physical budget device (MediaTek MT8781V/CA, Android 16):

  • Average Frame Inference (processFrame): ~18 ms for an 80 ms audio window (Real-time budget is ~80 ms)
  • Steady-State CPU Usage: ~5% - 7% while listening
  • Memory Footprint: ~32 MB Native Heap PSS

Quick Start

1. Installation

npm install react-native-openwakeword react-native-nitro-modules

(Remember to run cd ios && pod install for iOS)

2. Usage

Supply your own microphone audio stream (16 kHz, mono, signed 16-bit PCM ArrayBuffer) and let the engine handle the rest:

import { Openwakeword } from 'react-native-openwakeword'

// 1. Initialize detector with absolute paths to your .tflite models
const detector = await Openwakeword.createDetector({
  melspecPath: '/absolute/path/to/melspectrogram.tflite',
  embeddingPath: '/absolute/path/to/embedding_model.tflite',
  wakeWordPath: '/absolute/path/to/hey_jarvis.tflite',
})

detector.setThreshold(0.5)

// 2. Feed raw PCM audio frames from your audio recorder library
function onAudioBuffer(buffer: ArrayBuffer) {
  const result = detector.processFrame(buffer)

  if (result.isDetected) {
    console.log('Wake word detected!', result.probability)
  }
}

Requirements & Model Setup

  • React Native 0.74.0 or newer
  • react-native-nitro-modules
  • Android API 24+ | iOS 15.1+ | Node 20.0.0+

Model flexibility: Use your own .tflite models and control how they are delivered. On Android, copy bundled models or download them into app storage, then pass their absolute paths to the detector.


Models

Need a wake word model?

API Reference

  • Openwakeword.createDetector(paths: ModelPaths): Promise<WakeWordDetector> Loads the three .tflite models on a background thread. Resolves with a ready detector or rejects with a descriptive error if paths are invalid.
  • WakeWordDetector.processFrame(buffer: ArrayBuffer): DetectionResult Processes incoming PCM audio (expects 1280-sample / 80ms windows at 16kHz) and returns { probability: number, isDetected: boolean }.
  • WakeWordDetector.setThreshold(threshold: number): void Sets the probability threshold (0.0 to 1.0, default 0.5). Throws if out of bounds.
  • WakeWordDetector.reset(): void Clears internal streaming audio, mel, and embedding buffers (useful when resetting a voice session).

Profiling & Debugging (Android)

Enable native perf logs via system properties:

adb shell setprop debug.openwakeword.perf 1
adb logcat -s OpenWakeWord

Credits

Built with Nitro Modules and powered by openWakeWord.

License

Apache-2.0