Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice CheetahAzure Real-Time Speech-to-TextAmazon Transcribe StreamingGoogle Streaming ASR
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 NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice PorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidArduinoC.NETiOSLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSMicrocontrollerNode.jsPythonWeb
SummaryPicovoice CobraWebRTC VADSilero VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
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.getAvailableDevices()

static Future<List<String>> getAvailableDevices() async

Lists all available devices that Rhino can use for inference. Entries in the list can be used as the device argument when initializing Rhino.

Returns

  • List<String> : A list of devices Rhino can run inference on.

Throws

  • RhinoException : If unable to get devices.

Rhino.create()

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

Static creator for initializing Rhino.

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.
  • device String? : (Optional) The string representation of the device (e.g., CPU or GPU) to use. If set to best, the most suitable device is selected automatically. If set to gpu, the engine uses the first available GPU device. To select a specific GPU device, set this argument to gpu:${GPU_INDEX}, where ${GPU_INDEX} is the index of the target GPU. If set to cpu, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this argument to cpu:${NUM_THREADS}, where ${NUM_THREADS} is the desired number of threads.
  • 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()

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

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

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()

Future<void> reset() async

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.

Throws

  • RhinoException : If an error is encountered while resetting.

Rhino.delete()

Frees memory that was allocated for Rhino.

Future<void> delete() async

RhinoInference

class RhinoInference { }

Class for the Rhino's inference.


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

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


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 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
)

Static creator for initializing Rhino.

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 : An instance of RhinoManager.

Throws

  • RhinoException : If not initialized correctly.

RhinoManager.process()

Future<void> process() async

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

Throws

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

RhinoManager.delete()

Future<void> delete() async

Releases Rhino and audio resources.


InferenceCallback

typedef InferenceCallback = Function(RhinoInference inference);

Type for function that receives inference result from Rhino.

Parameters

  • inference RhinoInference : Rhino's inference.

ProcessErrorCallback

typedef ProcessErrorCallback = Function(RhinoException error);

Type for the error callback that occurs while processing audio.

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
  • getAvailableDevices()
  • create()
  • process()
  • reset()
  • delete()
  • RhinoInference
  • isFinalized
  • isUnderstood
  • intent
  • slots
  • RhinoManager
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • create()
  • process()
  • delete()
  • InferenceCallback
  • ProcessErrorCallback
  • RhinoException
Voice AI
  • picoLLM On-Device LLM
  • 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
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.