Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice Cheetah
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice Orca
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrainWeSpeaker
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeRustUnityWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustUnityWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiRustWebWindows
AndroidC.NETiOSNode.jsPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Rhino Speech-to-Intent
React Native API

API Reference for the React Native Rhino SDK (npm)


Rhino

class Rhino { }

Class for the Rhino Speech-To-Intent engine.

Use this class when using a custom audio processing pipeline. Otherwise it is recommended to use the RhinoManager High-Level API, which contains integrated audio recording.

Rhino.create()

public static async create(
accessKey: string,
contextPath: string,
modelPath?: string,
sensitivity: number = 0.5,
endpointDurationSec: number = 1.0,
requireEndpoint: boolean = true
): Promise<Rhino>

Rhino constructor.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • contextPath string : Path to Rhino context file (.rhn). Can be relative to the assets/resource folder or an absolute path to the file on device.
  • modelPath string : Optional. Path to the file containing model parameters (.pv). Can be relative to the assets/resource folder or an absolute path to the file on device.
  • sensitivity number : Optional. Inference sensitivity. Each value should be a number within [0, 1].
  • endpointDurationSec number : Optional. Endpoint duration in seconds. An endpoint is a chunk of silence at the end of an utterance that marks the end of spoken command. It should be a positive number within [0.5, 5]. A lower endpoint duration reduces delay and improves responsiveness. A higher endpoint duration assures Rhino doesn't return inference pre-emptively in case the user pauses before finishing the request.
  • requireEndpoint boolean : Optional. If set to true, Rhino requires an endpoint (a chunk of silence) after the spoken command. If set to false, Rhino tries to detect silence, but if it cannot, it still will provide inference regardless. Set to false only if operating in an environment with overlapping speech (e.g. people talking in the background).

Returns

  • Promise<Rhino>: An instance of Rhino Speech-To-Intent engine.

Rhino.delete()

public async delete(): Promise<void>

Releases resources acquired by Rhino.


Rhino.contextInfo

public get contextInfo(): string

Getter for Rhino context info.

Returns

  • string: Gets the source of the Rhino context in YAML format.

Rhino.frameLength

public get frameLength(): number

Getter for number of audio samples per frame.

Returns

  • number: Number of audio samples per frame.

Rhino.sampleRate

public get sampleRate(): number

Getter for audio sample rate accepted by Picovoice.

Returns

  • number: Audio sample rate accepted by Picovoice.

Rhino.version

public get version(): string

Getter for version.

Returns

  • string: Current Rhino version.

Rhino.process()

public async process(frame: number[]): Promise<RhinoInference>

Processes a frame of the incoming audio stream and emits the inference result. The number of samples per frame can be attained by calling .frameLength. The incoming audio needs to have a sample rate equal to .sampleRateand be 16-bit linearly-encoded. Rhino operates on single-channel audio.

Parameters

  • frame number[] : A frame of audio samples.

Returns

  • Promise<RhinoInference>: Inference result at time of frame being processed.

Rhino.reset()

public async reset(): Promise<void>

Resets the internal state of Rhino. It should be called before the engine can be used to infer intent from a new stream of audio.


RhinoInference

export class RhinoInference { }

Class to contain Rhino inference data.


RhinoInference.isFinalized

public get isFinalized(): boolean

Getter for the isFinalized flag.

Returns

  • boolean: If true, Rhino has made an inference.

RhinoInference.isUnderstood

get isUnderstood()

public get isUnderstood(): boolean | undefined

Returns

  • boolean | undefined: If true, Rhino understood the intent.

RhinoInference.intent

public get intent(): string | undefined

Getter for the inference intent name.

Returns

  • string | undefined: Inference intent name.

RhinoInference.slots

public get slots(): { [key: string]: string } | undefined

Getter for the inference slots and values.

Returns

  • {[key: string]: string} | undefined: Map for inference slots and values.

RhinoError

class RhinoError extends Error { }

Exception thrown if an error occurs within Rhino Speech-To-Intent engine.

Exceptions:

class RhinoActivationError extends RhinoError { }
class RhinoActivationLimitError extends RhinoError { }
class RhinoActivationRefusedError extends RhinoError { }
class RhinoActivationThrottledError extends RhinoError { }
class RhinoIOError extends RhinoError { }
class RhinoInvalidArgumentError extends RhinoError { }
class RhinoInvalidStateError extends RhinoError { }
class RhinoKeyError extends RhinoError { }
class RhinoMemoryError extends RhinoError { }
class RhinoRuntimeError extends RhinoError { }
class RhinoStopIterationError extends RhinoError { }

RhinoManager

class RhinoManager { }

High-level React Native binding for Rhino Speech-To-Intent engine. It handles recording audio from microphone, processes it in real-time using Rhino, and notifies the client when an inference is detected.

This class offers integrated audio capture. For use-cases where there is already an audio-processing pipeline in place, use the Rhino Low-Level API.

RhinoManager.create()

public static async create(
accessKey: string,
contextPath: string,
inferenceCallback: InferenceCallback,
processErrorCallback?: ProcessErrorCallback,
modelPath?: string,
sensitivity: number = 0.5,
endpointDurationSec: number = 1.0,
requireEndpoint: boolean = true
): Promise<Rhino>

Rhino constructor.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • contextPath string : Path to Rhino context file (.rhn). Can be relative to the assets/resource folder or an absolute path to the file on device.
  • inferenceCallback InferenceCallback : A callback for when Rhino detects the specified keywords.
  • processErrorCallback ProcessErrorCallback : Optional. A callback for when Rhino has made an intent inference.
  • modelPath string : Optional. Path to the file containing model parameters (.pv). Can be relative to the assets/resource folder or an absolute path to the file on device.
  • sensitivity number : Optional. Sensitivities for detecting keywords. Each value should be a number within [0, 1].
  • endpointDurationSec number : Optional. Endpoint duration in seconds. An endpoint is a chunk of silence at the end of an utterance that marks the end of spoken command. It should be a positive number within [0.5, 5]. A lower endpoint duration reduces delay and improves responsiveness. A higher endpoint duration assures Rhino doesn't return inference pre-emptively in case the user pauses before finishing the request.
  • requireEndpoint boolean : Optional. If set to true, Rhino requires an endpoint (a chunk of silence) after the spoken command. If set to false, Rhino tries to detect silence, but if it cannot, it still will provide inference regardless. Set to false only if operating in an environment with overlapping speech (e.g. people talking in the background).

Returns

  • Promise<Rhino>: An instance of Rhino Speech-To-Intent engine.

RhinoManager.delete()

public async delete(): Promise<void>

Releases resources acquired by RhinoManager.


RhinoManager.process()

public async process(): Promise<void>

Starts recording audio from the microphone and tries to infer intent. When RhinoManager returns an inference result via the inferenceCallback, it will automatically stop audio capture for you. When you wish to result, call .process() again.


RhinoManager.contextInfo

public get contextInfo(): string | undefined

Getter for Rhino context info.

Returns

  • string | undefined: Gets the source of the Rhino context in YAML format.

RhinoManager.frameLength

public get frameLength(): number | undefined

Getter for number of audio samples per frame.

Returns

  • number | undefined: Number of audio samples per frame.

RhinoManager.sampleRate

public get sampleRate(): number | undefined

Getter for audio sample rate accepted by Picovoice.

Returns

  • number | undefined: Audio sample rate accepted by Picovoice.

RhinoManager.version

public get version(): string | undefined

Getter for version.

Returns

  • string | undefined: Current Rhino version.

InferenceCallback

type InferenceCallback = (inference: RhinoInference) => void;

Callback interface invoked when an inference is finished.


ProcessErrorCallback

type ProcessErrorCallback = (error: RhinoErrors.RhinoError) => void;

Callback interface invoked when an error occurs while processing audio.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Rhino Speech-to-Intent React Native API
  • Rhino
  • create()
  • delete()
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • process()
  • reset()
  • RhinoInference
  • isFinalized
  • isUnderstood
  • intent
  • slots
  • RhinoError
  • RhinoManager
  • create()
  • delete()
  • process()
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • InferenceCallback
  • ProcessErrorCallback
Voice AI
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Orca Text-to-Speech
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Falcon Speaker Diarization
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Local LLM
  • picoLLM Inference
  • picoLLM Compression
  • picoLLM GYM
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
  • Playground
Sales & Services
  • Consulting
  • Foundation Plan
  • Enterprise Plan
  • Enterprise Support
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • X
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2025 Picovoice Inc.