Custom wake word for React Native

Ship a wake word inside your iOS and Android app. Audio is processed on the phone, so there is no server to run and nothing to pay per user.

Train your wake wordTest any model in the playground first.
91%of wake word utterances caught, on average, in our benchmark
~45 minfrom typing your phrase to a finished model

Why it works well here

  • ✓Runs on the device with onnxruntime-react-native
  • ✓One model file bundled with your app
  • ✓No per-user fees when you ship it commercially with Studio

How to set it up

  1. 01Train your wake word. Type your phrase on Outspoken and download the model.
  2. 02Install the runtime. Add onnxruntime-react-native. In Expo, add expo-audio to stream the microphone (it replaces the deprecated expo-av). In a React Native app without Expo, add react-native-live-audio-stream instead.
  3. 03Add the model to your app. Put the downloaded .onnx file in an assets/models/ folder in your app, next to the two shared model files, and tell Metro to bundle .onnx files (Expo and React Native use a different Metro config).
  4. 04Stream at 16 kHz and run the model. Stream the microphone (expo-audio's useAudioStream in Expo, react-native-live-audio-stream in React Native), cut it into 1280-sample frames and trigger your action when the score passes your threshold.
Install
npm install onnxruntime-react-native

# Expo
npx expo install expo-audio

# React Native (without Expo)
npm install react-native-live-audio-stream buffer
Full React Native guide →

Questions

Does the wake word work offline in a React Native app?

Yes. The model runs on the phone, so detection does not need a connection.

Can I use it in a commercial app?

Yes. Commercial use needs a Studio subscription, and there are no per-user fees.

Also runs on

Home AssistantRaspberry PiPythonBrowser