This script enables seamless audio streaming over TCP using PulseAudio on NetHunter devices. The recent updates provide a more robust, user-friendly experience with new features that enhance error handling, feedback, and overall usability.
- Automatic PulseAudio Management: The script automatically starts PulseAudio if it’s not running, with feedback to the user.
- Audio Quality Enhancement: Configures the audio stream to 100% volume and ensures the sink is unmuted for optimal streaming.
- Improved Module Management:
- Prevents redundant module loading and suppresses unnecessary error messages.
- Provides real-time feedback on the status of audio streaming through a status command.
- User Feedback and Color-Coded Output:
- Red: Indicates errors, such as failure to start or stop the stream.
- Green: Confirms successful stops.
- Blue: Shows successful starts.
- Yellow: Displays warnings or information, e.g., when PulseAudio is already running.
- Configurable Parameters: Users can modify IP address, port, audio rate, and format directly in the script for custom streaming setups.
- NetHunter: Ensure you have NetHunter installed on your device.
- PulseAudio: This script requires PulseAudio. Install it if you haven’t already:
sudo apt-get install pulseaudio
-
Clone the repository or download the script directly:
git clone https://github.com/MrRob0-X/Nethunter_audio.git cd NetHunter-Audio
or
wget https://github.com/MrRob0-X/Nethunter_audio/raw/refs/heads/main/audio
-
Move the script into
/usr/bin
for easy access:mv audio /usr/bin && chmod +x /usr/bin/audio
-
Download the simple protocol player app: link
To start streaming audio, run:
audio start
This command will start a TCP stream on the configured port, broadcasting audio from your NetHunter device.
To stop the audio stream, use:
audio stop
To check if audio streaming is active, use:
audio status
This command provides real-time feedback on whether the streaming module is currently active.
If you need help with the commands, use:
audio
This will display usage instructions.
The script contains functions to manage audio streaming effectively:
start_pulseaudio
: Starts PulseAudio if it’s not already running.set_sound_quality
: Sets the volume to 100% and ensures the sink is unmuted.start_stream
: Loads the TCP module for audio streaming.stop_stream
: Unloads the TCP module and stops PulseAudio.check_stream_status
: Provides the current status of audio streaming.
- PulseAudio Errors: Ensure PulseAudio is correctly installed and configured.
- Port Conflicts: If the default port is already in use, modify it in the script configuration section or free up the port.
Original reference: how-to-stream-my-gnu-linux-audio-output-to-android-devices-over-wi-fi.
This project is open-source and available under the GPL-3.0 license. See the LICENSE
file for more details.