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

API Reference for the iOS Rhino SDK (Cocoapod)


Rhino

public 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 class constructor. Resources should be cleaned when you are done using the delete() function.


Rhino.init()

init methods for the Rhino Speech-to-Intent engine.

public init(
accessKey: String,
contextPath: String,
modelPath: String? = nil,
sensitivity: Float32 = 0.5,
endpointDurationSec: Float32 = 1.0,
requireEndpoint: Bool = true) throws

Parameters

  • accessKey String : The AccessKey obtained from Picovoice Console.
  • contextPath String : Absolute path to file containing context parameters (.rhn). A context represents the set of expressions (spoken commands), intents, and intent arguments (slots) within a domain of interest.
  • modelPath String? : Absolute path to file containing model parameters (.pv).
  • sensitivity Float32 : Inference sensitivity. Each value should be a number within [0, 1]. A higher sensitivity results in fewer misses at the cost of increasing the false alarm rate.
  • endpointDurationSec Float32 : 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 : 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).

Throws

  • RhinoError: If an error occurs while creating an instance of Rhino Speech-to-Intent engine.

Rhino.delete()

Releases resources acquired by the Rhino engine.

public func delete()

Rhino.process()

Process a frame of audio with the inference engine.

public func process(pcm:[Int16]) throws -> Bool

Parameters

  • pcm [Int16] : An array of 16-bit pcm samples.

Returns

  • Bool : A boolean indicating whether Rhino has a result ready or not.

Throws

  • RhinoError: If there is an error while processing the audio frame.

Rhino.reset()

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.

public func reset() throws

Throws

  • RhinoError: If there is an error while resetting.

Rhino.getInference()

Get inference result from Rhino.

public func getInference() throws -> Inference

Returns

  • Inference : An inference object.

Throws

  • RhinoError: If there is an error while getting the inference.

Rhino.contextInfo

public var contextInfo: String

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

public static let frameLength: UInt32

The number of audio samples per frame.


Rhino.sampleRate

public static let sampleRate: UInt32

Audio sample rate accepted by Rhino engine.


Rhino.version

public static let version: String

Current Rhino version.


Inference

Class for the Rhino's inference.

public struct Inference { }

Inference.isUnderstood

public let isUnderstood: Bool

If true, Rhino understood the inference.


Inference.intent

public let intent: String

Inference intent name.


Inference.slots

public let slots: Dictionary<String, String>

Dictionary for inference slots and values.


RhinoManager

A High-level iOS binding for Rhino 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.

public class RhinoManager { }

RhinoManager.init()

public init(
accessKey: String,
contextPath: String,
modelPath: String? = nil,
sensitivity: Float32 = 0.5,
endpointDurationSec: Float32 = 1.0,
requireEndpoint: Bool = true,
onInferenceCallback: ((Inference) -> Void)?,
processErrorCallback: ((Error) -> Void)? = nil) throws

Parameters

  • accessKey String : The AccessKey obtained from Picovoice Console.
  • contextPath String : Absolute path to file containing context parameters (.rhn). A context represents the set of expressions (spoken commands), intents, and intent arguments (slots) within a domain of interest.
  • modelPath String? : Absolute path to file containing model parameters (.pv).
  • sensitivity Float32 : Inference sensitivity. Each value should be a number within [0, 1]. A higher sensitivity results in fewer misses at the cost of increasing the false alarm rate.
  • endpointDurationSec Float32 : 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 : 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).
  • onInferenceCallback ((Inference) -> Void)? : It is invoked upon completion of intent inference.
  • errorCallback ((Error) -> Void)? = nil) : Invoked if an error occurs while processing frames. If missing, error will be printed to console.

Throws

  • RhinoError : If an error occurs while creating an instance of Rhino engine.

RhinoManager.delete()

public func delete()

Stops recording and releases Rhino resources.


RhinoManager.process()

public func process() throws

Start recording audio from the microphone and infers the user's intent from the spoken command. Once the inference is finalized it will invoke the user provided callback and terminates recording audio.

Throws

  • RhinoError : if microphone permission is not granted or Rhino has been disposed.

RhinoManagerError

public enum RhinoManagerError: Error {}

Enums for RhinoManager error values:

  • case recordingDenied
  • case objectDisposed

RhinoError

public class RhinoError : LocalizedError { }

Error thrown if an error occurs within Rhino engine.

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

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Rhino Speech-to-Intent iOS API
  • Rhino
  • init()
  • delete()
  • process()
  • reset()
  • getInference()
  • contextInfo
  • frameLength
  • sampleRate
  • version
  • Inference
  • isUnderstood
  • intent
  • slots
  • RhinoManager
  • init()
  • delete()
  • process()
  • RhinoManagerError
  • RhinoError
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.