audiosource
audiosource copied to clipboard
:microphone: Use an Android device as a USB microphone
trafficstars
Audio Source
Audio Source forwards Android microphone audio input to the PulseAudio daemon through ADB, so you can use your Android device as a USB microphone.

Requirements
- Device with at least Android 4.0 (API level 14), but fully tested only on Android 10 (API level 29) so your mileage may vary.
- GNU/Linux machine with:
- Android SDK Platform Tools (requires
adbinPATH). - PulseAudio (requires
pactlinPATH). - Python 3 (requires
python3inPATH).
- Android SDK Platform Tools (requires
Usage
- Install the Audio Source APK by following the build instructions, or from the releases.
- Enable Android Debug Bridge (ADB) from the Developer options and connect the device to your computer.
- Run
./audiosource runto start Audio Source and forward the audio automatically. (You may have to grant the permission to record audio in Android.) - Run
./audiosource volume LEVEL, to set the PulseAudio source volume to LEVEL, for instance200%(you will likely need to set the volume higher than 100%).
Build and install
Run ./gradlew tasks to list the available commands.
Debug
$ ./audiosource build
$ ./audiosource install
Release
-
Generate a Java KeyStore:
$ keytool -keystore /home/user/android.jks -genkey -alias release \ -keyalg RSA -keysize 2048 -validity 30000 -
Create
keystore.propertiesin the project root directory containing:storeFile=/home/user/android.jks storePassword=STORE_PASS keyAlias=release keyPassword=KEY_PASS -
Build and install:
$ export AUDIOSOURCE_PROFILE=release $ ./audiosource build $ ./audiosource install
Acknowledgement
sndcpy for the initial implementation of audio playback forwarding.
License
This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT).