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

Audio Recording
Android Quick Start

Platforms

  • Android (5.0+, API 21+)

Requirements

  • Android Studio
  • Android device with USB debugging enabled or Android simulator

Quick Start

Setup

  1. Install Android Studio.

  2. Include mavenCentral() repository in the top-level build.gradle. Then add the following to the app's build.gradle:

dependencies {
// ...
implementation 'ai.picovoice:android-voice-processor:${LATEST_VERSION}' // replace with latest version
}
  1. Add the following to the app's AndroidManifest.xml file to enable recording with an Android device's microphone:
<uses-permission android:name="android.permission.RECORD_AUDIO" />

Usage

Access the singleton instance of VoiceProcessor:

import ai.picovoice.android.voiceprocessor.*;
VoiceProcessor voiceProcessor = VoiceProcessor.getInstance();

Add listeners for audio frames and errors:

final VoiceProcessorFrameListener frameListener = frame -> {
// use audio data
};
final VoiceProcessorErrorListener errorListener = e -> {
// handle error
};
voiceProcessor.addFrameListener(frameListener);
voiceProcessor.addErrorListener(errorListener);

Start audio capture with the desired frame length and audio sample rate:

final int frameLength = 512;
final int sampleRate = 16000;
voiceProcessor.start(frameLength, sampleRate);

Stop audio capture:

voiceProcessor.stop();

Once audio capture has started successfully, any frame listeners assigned to the VoiceProcessor will start receiving audio frames with the given frameLength and sampleRate.

Capturing with Multiple Listeners

Any number of listeners can be added to and removed from the VoiceProcessor instance. However, the instance can only record audio with a single audio configuration (frameLength and sampleRate), which all listeners will receive once a call to start() has been made. To add multiple listeners:

VoiceProcessorFrameListener listener1 = frame -> { };
VoiceProcessorFrameListener listener2 = frame -> { };
VoiceProcessorFrameListener[] listeners = new VoiceProcessorFrameListener[] {
listener1, listener2
};
voiceProcessor.addFrameListeners(listeners);
voiceProcessor.removeFrameListeners(listeners);
// or
voiceProcessor.clearFrameListeners();

Demo

For the Voice Processor Android SDK we have an example app that demonstrates how to use VoiceProcessor in an Android app.

Setup

Clone the android-voice-processor repository from GitHub:

git clone https://github.com/Picovoice/android-voice-processor.git

Usage

  1. Open the example app using Android Studio or build with Gradle:
./gradlew assembleDebug
  1. Toggle recording on and off with the button in the center of the screen. While recording, the VU meter on the screen will respond to the volume of incoming audio.

For more information on our Voice Processor demo for Android, head over to our GitHub repository.

Resources

Package

  • android-voice-processor on Maven Central Repository

API

  • android-voice-processor API Docs

GitHub

  • Voice Processor Android SDK on GitHub
  • Voice Processor Android Demo on GitHub

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Audio Recording Android Quick Start
  • Platforms
  • Requirements
  • Quick Start
  • Setup
  • Usage
  • Capturing with Multiple Listeners
  • Demo
  • Setup
  • Usage
  • Resources
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.