Skip to content

aahlenst/android-audiorecord-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android AudioRecord Sample

This is a sample project that demonstrates how to record audio on an Android device using the AudioRecord class.

Details

The sample contains multiple Activities, each demonstrating a different scenario to keep the code easily digestable:

  • AudioRecordActivity: Records PCM using the internal microphones
  • BluetoothRecordActivity: Records PCM using a Bluetooth HFP device

To launch the desired Activity, change the AndroidManifest.xml accordingly.

The output is written to the device's SD card and can be downloaded from there using adb:

adb pull /sdcard/recording.pcm ~/Desktop/recording.pcm

To listen to the PCM use Audacity or a similar software. To import a PCM into Audacity use the menu File > Import > RAW data. The endianness of the PCM is usually Little Endian on Android devices (x86, ARM).

License

This software is licensed under the terms of the Apache License, Version 2.0.

About

Demonstrates how to record audio using Android's AudioRecord

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages