React Native Quick Start
- Android (5.0+, API 21+)
- iOS (11.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
RhinoManager that infers intent from spoken commands within a given context :
Once you have instantiated a RhinoManager, you can start audio capture and intent inference by calling:
When RhinoManager returns an inference result via the
inferenceCallback, it will automatically stop audio capture for you.
When you wish to result, call
Once your app is done with using RhinoManager, be sure you explicitly release the resources allocated for it:
Create a custom context using the Picovoice Console . Download the custom context file (
.rhn) and add it to the 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 ....
Alternatively, if the context file is deployed to the device with a different method, the absolute path to the file 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 Rhino GitHub repository .
Add the model file to your assets/resource directory and pass in the relative 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 Rhino React Native SDK, there is a React Native demo project available on the Rhino GitHub repository .
Clone the Rhino repository from GitHub:
- Install dependencies and setup environment:
- Connect a mobile device or launch a simulator and run:
For more information on our Rhino demos for React Native, head over to our GitHub repository .
- @picovoice/rhino-react-native on the npm registry
- @picovoice/react-native-voice-processor on the npm registry