Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RemoteAudio

An ultra-low latency, real-time wireless audio transmission system that turns your Android device into a high-performance audio peripheral (Speaker + Microphone with Active Noise Cancellation) for a Linux PC running PipeWire/PulseAudio.


🚀 Key Features

  • Ultra-Low Latency Engine: Built on Android's native C++ AAudio API with SCHED_FIFO priority, lock-free ring buffers, and UDP sockets optimized for minimal delay.
  • Dual Operating Modes:
    • Host Mode: Sends Android speaker audio to the network; plays incoming network audio to the Android system microphone.
    • Peripheral Mode: Plays incoming PC audio to the Android speakers; captures Android microphone audio (with Hardware ANC + Software HPF + Echo ducking) and streams it back to the PC.
  • Acoustic Echo Cancellation (AEC):
    • Hardware DSP Binding: Links AudioRecord and AudioTrack under AudioManager.MODE_IN_COMMUNICATION with shared session IDs for optimal Android hardware AEC/AGC performance.
    • Software Filter Stage: A 100Hz High-Pass Filter (HPF) and dynamic echo ducking module suppress room feedback loop back to the Linux PC.
  • In-Call Routing Control: Easily toggle on-the-fly between Loudspeaker (main handsfree speakerphone) and Earpiece (in-call receiver) outputs.
  • Symmetric Auto-Return Learning: Automatically learns the sender's return IP/port on the first incoming UDP packet—working flawlessly behind NAT or virtual emulators with one-way connection initiation.
  • LAN Peer Discovery: Interactive Compose UI on Android and Tkinter GUI on Linux with UDP discovery beacons.
  • PipeWire Device Isolation: Automatically configures virtual input and output devices under Linux without audio crosstalk.

🛠 Project Structure

RemoteAudio/
├── app/                  # Android Project (Kotlin + C++ Native Engine)
│   ├── src/main/cpp/     # C++ AAudio Engine
│   └── src/main/java/    # Android Kotlin App
├── linux/                # Linux Desktop Client & Daemon
│   ├── remoteaudio.py    # Desktop GUI App (Tkinter)
│   ├── remoteaudio-cli.py# Headless Daemon (CLI)
│   └── install.sh        # Installer Script
└── README.md             # This Guideline file

🐧 Linux Setup & Guideline

Prerequisites

Ensure the following tools are installed on your Linux system:

# Fedora / RHEL
sudo dnf install pulseaudio-utils pipewire-utils python3-tkinter

# Ubuntu / Debian
sudo apt install pulseaudio-utils pipewire-bin python3-tk

Installation

Run the provided installation script to install the desktop launcher and binary:

cd linux/
./install.sh

Running the GUI App

Start the GUI app from your desktop launcher or run:

./remoteaudio.py

Running the CLI Daemon (Headless)

For headless setups or terminal-only usage, launch the daemon directly:

./remoteaudio-cli.py [TARGET_ANDROID_IP]
# Example:
./remoteaudio-cli.py 192.168.10.128

Sound Configuration in Linux Settings

When the RemoteAudio bridge is active, select the virtual devices inside your Linux system sound settings or volume control widget:

  1. Output (Playback / Speaker): Select RemoteAudio_Virtual_Speaker.
  2. Input (Recording / Microphone): Select RemoteAudio_Virtual_Microphone.

🤖 Android Setup & Guideline

Building the APK

Compile and assemble the debug build using the Gradle wrapper:

./gradlew assembleDebug

The compiled APK will be generated at: app/build/outputs/apk/debug/app-debug.apk

Application Guidelines

  1. Open the Remote Audio HAL app on your Android device.
  2. Select Peripheral Mode to use the Android device as a wireless PC speaker and microphone (with ANC enabled).
  3. Choose the preferred Android Audio Output Speaker:
    • Loudspeaker: Play audio through the main speakerphone.
    • Earpiece: Play audio privately through the top phone call receiver.
  4. Enter the target Linux PC's IP address (learned automatically via symmetric packets) or tap on a discovered PC peer in the list.
  5. Tap START STREAMING.

About

An ultra-low latency, real-time wireless audio transmission system that turns your Android device into a high-performance audio peripheral (Speaker + Microphone with Active Noise Cancellation) for a Linux PC running PipeWire/PulseAudio.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages