Android Quick Start
- Android (5.0+, API 21+)
- Android Studio
- Android device with USB debugging enabled or Android simulator
Install Android Studio .
mavenCentral()repository in the top-level
build.gradle. Then add the following to the app's
- Add the following to the app's
AndroidManifest.xmlfile to enable recording with an Android device's microphone:
Access the singleton instance of
Add listeners for audio frames and errors:
Start audio capture with the desired frame length and audio sample rate:
Stop audio capture:
Once audio capture has started successfully, any frame listeners assigned to the
will start receiving audio frames with the given
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 (
which all listeners will receive once a call to
start() has been made. To add multiple listeners:
For the Voice Processor Android SDK we have an example app that demonstrates how to use
VoiceProcessor in an Android app.
Clone the android-voice-processor repository from GitHub:
- Open the example app using Android Studio or build with Gradle:
- 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 .