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
Flutter API

API Reference for the Rhino Flutter SDK (pub.dev) .


Rhino

class Rhino { }

Class for the Rhino Speech-to-Intent engine. Rhino can be initialized either using the High-level RhinoManager() Class or directly using the creator. Resources should be cleaned when you are done using the delete() function.

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.contextInfo

String get contextInfo

Gets the source of the Rhino context in YAML format. Shows the list of intents, which expressions map to those intents, as well as slots and their possible values.


Rhino.frameLength

int get frameLength

Getter for the number of audio samples per frame required by Rhino.


Rhino.sampleRate

int get sampleRate

Getter for the audio sample rate required by Rhino.


Rhino.version

String get version

Getter for Rhino version string.


Rhino.create()

Static creator for initializing Rhino.

static Future<Rhino> create(String accessKey, String contextPath,
{String? modelPath,
double sensitivity = 0.5,
double endpointDurationSec = 1.0,
bool requireEndpoint = true}) async

Parameters

  • accessKey String : AccessKey obtained from Picovoice Console.
  • contextPath String : Path to the Rhino context file (.rhn). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device.
  • modelPath String? : (Optional) Path to the file containing model parameters (.pv). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device. If not set it will be set to the default location.
  • sensitivity double? : (Optional) Inference sensitivity. A higher sensitivity value results in fewer misses at the cost of (potentially) increasing the erroneous inference rate. Sensitivity should be a floating-point number within 0 and 1.
  • endpointDurationSec double? : (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 bool? : (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

  • [Rhino](#rhino) an instance of the speech-to-intent engine.

Throws

  • RhinoException : If not initialized correctly.

Rhino.process()

Process a frame of pcm audio with the Speech-to-Intent engine.

Future<RhinoInference> process(List<int>? frame) async

Parameters

  • frame List<int>? : a frame of audio samples to be assessed by Rhino. The required audio format is found by calling .sampleRate to get the required sample rate and .frameLength to get the required frame size. Audio must be single-channel and 16-bit linearly-encoded.

Returns

  • RhinoInference object.

Throws

  • RhinoException : If an error is encountering while processing.

Rhino.reset()

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

Future<void> reset() async

Throws

  • RhinoException : If an error is encountered while resetting.

Rhino.delete()

Frees memory that was allocated for Rhino.

Future<void> delete() async

RhinoInference

Class for the Rhino's inference.

class RhinoInference { }

RhinoInference.isFinalized

bool get isFinalized

Whether Rhino has made an inference.


RhinoInference.isUnderstood

bool? get isUnderstood

If true, Rhino understood the inference.


RhinoInference.intent

String? get intent

If isUnderstood, name of intent that was inferred.


RhinoInference.slots

Map<String, String>? get slots

If isUnderstood, dictionary of slot keys and values that were inferred.


RhinoManager

Manager for creating an instance of Rhino. A High-level Flutter binding for Rhino Speech-to-Intent engine that handles recording audio from microphone, processes it in real-time using Rhino, and notifies the client when an intent is inferred from the spoken command.

class RhinoManager { }

RhinoManager.contextInfo

String get contextInfo

Gets the source of the Rhino context in YAML format. Shows the list of intents, which expressions map to those intents, as well as slots and their possible values.


RhinoManager.frameLength

int get frameLength

Getter for the number of audio samples per frame required by Rhino.


RhinoManager.sampleRate

int get sampleRate

Getter for the audio sample rate required by Rhino.


RhinoManager.version

String get version

Getter for Rhino version string.


RhinoManager.create()

Static creator for initializing Rhino.

static Future<RhinoManager> create(
String accessKey,
String contextPath,
InferenceCallback inferenceCallback,
{String? modelPath,
double sensitivity = 0.5,
double endpointDurationSec = 1.0,
bool requireEndpoint = true,
ProcessErrorCallback? processErrorCallback} async
)

Parameters

  • accessKey String : AccessKey obtained from Picovoice Console.
  • contextPath String : Path to the Rhino context file (.rhn). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device.
  • inferenceCallback InferenceCallback : A callback for when Rhino has made an intent inference.
  • modelPath String? : (Optional) Path to the file containing model parameters (.pv). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device. If not set it will be set to the default location.
  • sensitivity double? : (Optional) Inference sensitivity. A higher sensitivity value results in fewer misses at the cost of (potentially) increasing the erroneous inference rate. Sensitivity should be a floating-point number within 0 and 1.
  • requireEndpoint bool? : (Optional) Boolean variable to indicate if Rhino should wait for a chunk of silence before finishing inference.
  • endpointDurationSec double? : (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 bool? : (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).
  • processErrorCallback ProcessErrorCallback : (Optional) Reports errors that are encountered while the engine is processing audio.

Returns

  • [RhinoManager](#rhinomanager) : An instance of RhinoManager.

Throws

  • RhinoException : If not initialized correctly.

RhinoManager.process()

Opens audio input stream and sends audio frames to Rhino until an inference result is sent via inference callback.

Future<void> process() async

Throws

  • RhinoException : If there was a problem starting the audio engine.

RhinoManager.delete()

Releases Rhino and audio resources.

Future<void> delete() async

InferenceCallback

Type for function that receives inference result from Rhino.

typedef InferenceCallback = Function(RhinoInference inference);

Parameters

  • inference RhinoInference : Rhino's inference.

ProcessErrorCallback

Type for the error callback that occurs while processing audio.

typedef ProcessErrorCallback = Function(RhinoException error);

Parameters

  • error RhinoException

RhinoException

class RhinoException implements Exception { }

Exception thrown if an error occurs within Rhino engine:

class RhinoMemoryException extends RhinoException { }
class RhinoIOException extends RhinoException { }
class RhinoInvalidArgumentException extends RhinoException { }
class RhinoStopIterationException extends RhinoException { }
class RhinoKeyException extends RhinoException { }
class RhinoInvalidStateException extends RhinoException { }
class RhinoRuntimeException extends RhinoException { }
class RhinoActivationException extends RhinoException { }
class RhinoActivationLimitException extends RhinoException { }
class RhinoActivationThrottledException extends RhinoException { }
class RhinoActivationRefusedException extends RhinoException { }

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Rhino Speech-to-Intent Flutter API
  • Rhino
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • create()
  • process()
  • reset()
  • delete()
  • RhinoInference
  • isFinalized
  • isUnderstood
  • intent
  • slots
  • RhinoManager
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • create()
  • process()
  • delete()
  • InferenceCallback
  • ProcessErrorCallback
  • RhinoException
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.