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

Voice Processor
React Native API

API Reference for the Voice Processor React Native SDK(npmjs).


VoiceProcessor

class VoiceProcessor { }

The main class for the VoiceProcessor library. This class provides methods to manage audio recording and handle audio frame events.


VoiceProcessor.instance

static get instance: VoiceProcessor

Singleton instance of the VoiceProcessor class.

Returns

  • VoiceProcessor : The singleton instance of VoiceProcessor.

VoiceProcessor.numFrameListeners

get numFrameListeners: number

Gets the number of currently subscribed frame listeners.

Returns

  • number : The number of currently subscribed frame listeners.

VoiceProcessor.numErrorListeners

get numErrorListeners: number

Gets the number of currently subscribed error listeners.

Returns

  • number : The number of currently subscribed error listeners.

VoiceProcessor.addFrameListener()

addFrameListener(listener: VoiceProcessorFrameListener)

Adds a new listener that receives audio frames.

Parameters

  • listener VoiceProcessorFrameListener : The listener function to be called when audio frames are received.

VoiceProcessor.addFrameListeners()

addFrameListeners(listeners: VoiceProcessorFrameListener[])

Adds multiple listeners that receive audio frames.

Parameters

  • listeners VoiceProcessorFrameListener[] : An array of listeners to be added.

VoiceProcessor.removeFrameListener()

removeFrameListener(listener: VoiceProcessorFrameListener)

Removes a previously added frame listener.

Parameters

  • listener VoiceProcessorFrameListener : The listener function to be removed.

VoiceProcessor.removeFrameListeners()

removeFrameListeners(listeners: VoiceProcessorFrameListener[])

Removes previously added frame listeners.

Parameters

  • listeners VoiceProcessorFrameListener[] : An array of listeners to be removed.

VoiceProcessor.clearFrameListeners()

clearFrameListeners()

Removes all frame listeners.


VoiceProcessor.addErrorListener()

addErrorListener(errorListener: VoiceProcessorErrorListener)

Adds a new error listener.

Parameters

  • errorListener VoiceProcessorErrorListener : The listener to be called when errors occur.

VoiceProcessor.removeErrorListener()

removeErrorListener(errorListener: VoiceProcessorErrorListener)

Removes a previously added error listener.

Parameters

  • errorListener VoiceProcessorErrorListener : The error listener to be removed.

VoiceProcessor.clearErrorListeners()

clearErrorListeners()

Removes all error listeners.


VoiceProcessor.start()

async start(frameLength: number, sampleRate: number): Promise<void>

Starts audio recording with specified audio parameters.

Parameters

  • frameLength number : The desired length of audio frames, in number of samples.
  • sampleRate number : The desired sample rate for audio recording, in Hz.

Throws

  • VoiceProcessorError : If an error occurs while attempting to start audio recording.

Returns

  • Promise<void> : A promise that resolves when recording starts.

VoiceProcessor.stop()

async stop(): Promise<void>

Stops audio recording.

Throws

  • VoiceProcessorError : If an error occurs while attempting to stop audio recording.

Returns

  • Promise<void> : A promise that resolves when recording stops.

VoiceProcessor.isRecording()

async isRecording(): Promise<boolean>

Checks if audio recording is currently in progress.

Returns

  • Promise<boolean> : A promise that resolves with a boolean indicating recording status.

VoiceProcessor.hasRecordAudioPermission()

async hasRecordAudioPermission(): Promise<boolean>

Checks if the app has permission to record audio and prompts user if not.

Returns

  • Promise<boolean> : A promise that resolves with a boolean indicating permission status.

VoiceProcessorFrameListener

type VoiceProcessorFrameListener = (frame: number[]) => void;

Type for callback functions that receive audio frames from the VoiceProcessor.


VoiceProcessorErrorListener

type VoiceProcessorErrorListener = (error: VoiceProcessorError) => void;

Type for callback functions that receive errors from the VoiceProcessor.


VoiceProcessorError

class VoiceProcessorError extends Error { }

Exception class for errors related to the VoiceProcessor.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Voice Processor React Native API
  • VoiceProcessor
  • instance
  • numFrameListeners
  • numErrorListeners
  • addFrameListener()
  • addFrameListeners()
  • removeFrameListener()
  • removeFrameListeners()
  • clearFrameListeners()
  • addErrorListener()
  • removeErrorListener()
  • clearErrorListeners()
  • start()
  • stop()
  • isRecording()
  • hasRecordAudioPermission()
  • VoiceProcessorFrameListener
  • VoiceProcessorErrorListener
  • VoiceProcessorError
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.