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

API Reference for the Voice Processor Android SDK(android-voice-processor).

package: ai.picovoice.android.voiceprocessor


VoiceProcessor

public class VoiceProcessor { }

Class for capturing audio and delivering audio data via listeners.


VoiceProcessor.getInstance()

public static synchronized VoiceProcessor getInstance()

Obtain singleton instance of the VoiceProcessor.

Returns

  • VoiceProcessor: Singleton instance.

VoiceProcessor.getIsRecording()

public boolean getIsRecording()

Indicates whether the VoiceProcessor is currently recording or not.

Returns

  • boolean : flag indicating whether the VoiceProcessor is currently recording.

VoiceProcessor.hasRecordAudioPermission()

public boolean hasRecordAudioPermission(Context context)

Indicates whether the given context has been granted RECORD_AUDIO permissions or not.

Parameters

  • context Context : Android app context.

Returns

  • boolean : flag indicating whether RECORD_AUDIO permission has been granted.

VoiceProcessor.addFrameListener()

public void addFrameListener(VoiceProcessorFrameListener listener)

Add a frame listener that will receive audio frames generated by the VoiceProcessor.

Parameters

  • listener VoiceProcessorFrameListener : listener for processing frames of audio.

VoiceProcessor.addFrameListeners()

public void addFrameListeners(VoiceProcessorFrameListener[] listeners)

Add multiple frame listeners that will receive audio frames generated by the VoiceProcessor.

Parameters

  • listeners VoiceProcessorFrameListener[] : listeners for processing frames of audio.

VoiceProcessor.removeFrameListener()

public void removeFrameListener(VoiceProcessorFrameListener listener)

Remove a frame listener from the VoiceProcessor. It will no longer receive audio frames.

Parameters

  • listener VoiceProcessorFrameListener : listener to remove

VoiceProcessor.removeFrameListeners()

public void removeFrameListener(VoiceProcessorFrameListener[] listeners)

Remove frame listeners from the VoiceProcessor. They will no longer receive audio frames.

Parameters

  • listener VoiceProcessorFrameListener[] : listeners to remove

VoiceProcessor.clearFrameListeners()

public void clearFrameListeners()

Clear all frame listeners from the VoiceProcessor. They will no longer receive audio frames.


VoiceProcessor.getNumFrameListeners()

public int getNumFrameListeners()

Get number of frame listeners that are currently subscribed to the VoiceProcessor.

Returns

  • int : the number of frame listeners

VoiceProcessor.addErrorListener()

public void addErrorListener(VoiceProcessorErrorListener errorListener)

Add an error listener that will receive errors generated by the VoiceProcessor.

Parameters

  • errorListener VoiceProcessorErrorListener : listener for catching recording errors.

VoiceProcessor.removeErrorListener()

public void removeErrorListener(VoiceProcessorErrorListener errorListener)

Remove an error listener from the VoiceProcessor that had previously been added.

Parameters

  • errorListener VoiceProcessorErrorListener : error listener to remove.

VoiceProcessor.clearErrorListeners()

public void clearErrorListeners()

Clear all error listeners from the VoiceProcessor.


VoiceProcessor.getNumErrorListeners()

public int getNumErrorListeners()

Get number of error listeners that are currently subscribed to the VoiceProcessor.

Returns

  • int : the number of error listeners

VoiceProcessor.start()

public synchronized void start(
final int requestedFrameLength,
final int requestedSampleRate) throws VoiceProcessorArgumentException

Starts audio capture. You need to subscribe a VoiceProcessorFrameListener via addFrameListner() in order to receive audio frames from the VoiceProcessor.

Parameters

  • requestedFrameLength int : Number of audio samples per frame.
  • requestedSampleRate int : Audio sample rate that the audio will be captured with.

Throws

  • VoiceProcessorArgumentException : error if VoiceProcessor is already recording with a different configuration.

VoiceProcessor.stop()

public synchronized void stop() throws VoiceProcessorException

Stops audio capture. Frames will stop being delivered to the subscribed listeners.

Throws

  • VoiceProcessorException : if an error is encountered while trying to stop the recorder thread.

VoiceProcessorFrameListener

public interface VoiceProcessorFrameListener {
void onFrame(short[] frame);
}

Listener type that can be added to VoiceProcessor with addFrameListener(). Captures audio frames that are generated by the recording thread.


VoiceProcessorErrorListener

public interface VoiceProcessorErrorListener {
void onError(VoiceProcessorException error);
}

Listener type that can be added to VoiceProcessor with addErrorListener(). Captures errors that are thrown by the recording thread.


VoiceProcessorException

public class VoiceProcessorException extends Exception { }

Exception thrown if an error occurs within the VoiceProcessor.

Exceptions:

public class VoiceProcessorArgumentException extends VoiceProcessorException { }
public class VoiceProcessorReadException extends VoiceProcessorException { }
public class VoiceProcessorStateException extends VoiceProcessorException { }

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Voice Processor Android API
  • VoiceProcessor
  • getInstance()
  • getIsRecording()
  • hasRecordAudioPermission()
  • addFrameListener()
  • addFrameListeners()
  • removeFrameListener()
  • removeFrameListeners()
  • clearFrameListeners()
  • getNumFrameListeners()
  • addErrorListener()
  • removeErrorListener()
  • clearErrorListeners()
  • getNumErrorListeners()
  • start()
  • stop()
  • VoiceProcessorFrameListener
  • VoiceProcessorErrorListener
  • VoiceProcessorException
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.