Porcupine Wake Word
React Native Quick Start
- Android 5.0+ (API 21+)
- iOS 9.0+
- Picovoice Account and AccessKey
- React Native 0.62.2+
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your
Make sure to keep your
Setup the React Native environment.
Install the npm packages:
- Enable the proper permission for recording with the hardware's microphone on both iOS and Android:
Info.plist and add the following line:
AndroidManifest.xml and add the following line:
Request audio recording permissions from the user:
Create an instance of
PorcupineManager that detects the included built-in wake words
Start audio capture and wake word detection with:
Free resources used by
Create a custom keyword using the Picovoice Console. Download the custom wake word file (
.ppn) and add them to your platform projects:
Android custom models must be added to
iOS custom models can be added anywhere under
./ios, but they must be included as a bundled resource in XCode by right-clicking on the
Navigation tab, and clicking
Add Files To ....
Create an instance of
PorcupineManager using the
Keyword path arguments are relative to the platform-specific asset/resource directory.
Alternatively, if the keyword files are deployed to the device with a different method, the absolute paths to the files on device can be used.
Use the corresponding model file (
.pv), to detect non-English wake words.
The model files for all supported languages are available
on the Porcupine GitHub repository.
Add the model file to your assets/resource directory and pass in the relative file path using the
Alternatively, if the model file is deployed to the device with a different method, the absolute path to the file on device can be used.
For the Porcupine React Native SDK, there is a React Native demo project available on the Porcupine GitHub repository.
Clone the Porcupine repository from GitHub:
- Install dependencies and setup environment:
- Connect a mobile device or launch a simulator and run:
For more information on our Porcupine demos for React Native, head over to our GitHub repository.
- @picovoice/porcupine-react-native on the npm registry
- @picovoice/react-native-voice-processor on the npm registry