Audio Source forwards Android microphone audio input to the PulseAudio daemon through ADB, so you can use your Android device as a USB microphone.
- 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
adb
inPATH
). - PulseAudio or PipeWire with PulseAudio support (requires
pactl
inPATH
). - Python 3 (requires
python3
inPATH
).
- Android SDK Platform Tools (requires
- Install the Audio Source APK on your Android device through F-Droid, or from the releases, or by following the build instructions.
- Download the
audiosource
client script on your computer from the releases, and mark it executable withchmod a+x ./audiosource
.
-
Enable Android Debug Bridge (ADB) from the Developer options and connect the device to your computer.
-
Run
./audiosource run
to 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 toLEVEL
(for instance200%
). You will likely need to set the volume higher than100%
.
If you have multiple devices connected then you will have to specify the serial
number of the device you would like to forward audio to with ./audiosource -s SERIAL COMMAND
or by setting the $ANDROID_SERIAL
environment variable.
Device serial numbers can be found by running adb devices
.
You can utilize job control to forward audio from multiple devices simultaneously as follows:
$ ./audiosource -s shiba run & # press ENTER to regain control of your terminal
$ ./audiosource -s 192.168.1.188:39857 run
Run ./gradlew tasks
to list the available commands.
$ ./audiosource build
$ ./audiosource install
-
Generate a Java KeyStore:
$ keytool -keystore /home/user/android.jks -genkey -alias release \ -keyalg RSA -keysize 2048 -validity 30000
-
Create
keystore.properties
in 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
sndcpy for the initial implementation of audio playback forwarding.
This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT).