A cross-platform background application that prevents Alexa devices from automatically disconnecting from Bluetooth by playing silent audio at regular intervals.
Alexa devices often disconnect from Bluetooth when there's no audio activity, causing annoying "Now connected to DEVICE_NAME" messages when they reconnect. Alexa Silencer solves this by playing completely silent audio every 5 minutes to maintain the Bluetooth connection.
Problem solved: No more interruptions from Alexa reconnection announcements!
- Cross-Platform: Works on both Windows and Linux
- Completely Invisible: Runs entirely in the background with no visible interface
- Auto-Startup: Automatically configures itself to run on system startup
- One-Time Setup: Run once and forget - no manual configuration needed
- Silent Operation: Plays 0-volume audio that's completely inaudible
- Minimal Dependencies: Only requires pygame for audio handling
- Open Source: MIT licensed and ready for community contributions
Windows:
- Download or clone this repository
- Double-click
setup.bat - Done! The application will install dependencies and configure auto-startup
Linux:
- Download or clone this repository
- Run
chmod +x setup.sh && ./setup.sh - Done! The application will install dependencies and configure auto-startup
Prerequisites:
- Python 3.6 or higher
- pip (Python package installer)
Steps:
-
Clone or download this repository
git clone https://github.com/0x-Decrypt/alexa-silencer.git cd alexa-silencer -
Install dependencies
pip install -r requirements.txt
-
Run the application (one-time setup)
python alexa_silencer.py
- Download the latest release from the Releases page
- Run the executable for your platform
- No Python installation required!
What happens after setup:
- β Application configures itself to run automatically on startup
- β Starts running in the background immediately
- β Plays silent audio every 5 minutes to maintain Bluetooth connection
- β Your Alexa device stays connected without announcements!
- Uses Windows Task Scheduler for auto-startup
- Creates a scheduled task that runs on user logon
- Runs completely hidden with no console window
- Uses systemd user services for auto-startup
- Creates
~/.config/systemd/user/alexa-silencer.service - Runs as a background daemon service
- Logs:
%APPDATA%\AlexaSilencer\alexa_silencer.log - Startup script:
%APPDATA%\AlexaSilencer\alexa_silencer_startup.bat
- Logs:
~/.alexa_silencer/alexa_silencer.log - Service file:
~/.config/systemd/user/alexa-silencer.service
The application requires no manual configuration. Key settings:
- Audio Interval: 5 minutes (300 seconds)
- Audio Duration: 10 milliseconds of silence
- Volume Level: 0 (completely silent)
- Audio Format: 22050 Hz, 16-bit, mono
Windows:
tasklist | findstr python
# or
schtasks /query /tn "AlexaSilencer"Linux:
systemctl --user status alexa-silencer
# or
ps aux | grep alexa_silencerWindows:
type "%APPDATA%\AlexaSilencer\alexa_silencer.log"Linux:
cat ~/.alexa_silencer/alexa_silencer.logWindows:
schtasks /end /tn "AlexaSilencer"Linux:
systemctl --user stop alexa-silencerWindows:
schtasks /delete /tn "AlexaSilencer" /fLinux:
systemctl --user disable alexa-silencer
systemctl --user stop alexa-silencer
rm ~/.config/systemd/user/alexa-silencer.service"pygame not found" error:
pip install pygamePermission denied (Windows):
- Run Command Prompt as Administrator
- Try:
schtasks /create /tn "AlexaSilencer" /tr "path\to\script" /sc onlogon /ru "SYSTEM"
Service fails to start (Linux):
systemctl --user daemon-reload
systemctl --user restart alexa-silencer
journalctl --user -u alexa-silencer -fTo create a single executable file for distribution:
python build.pyThis creates a distribution folder with:
- Standalone executable
- Documentation
- Run instructions
-
Install PyInstaller
pip install pyinstaller
-
Build executable
Windows:
pyinstaller --onefile --noconsole --hidden-import=pygame --name=alexa-silencer alexa_silencer.py
Linux:
pyinstaller --onefile --console --hidden-import=pygame --name=alexa-silencer alexa_silencer.py
The executable will be in the dist/ folder.
The build script creates platform-specific folders:
releases/- Contains the latest executable for easy access- Platform-specific distribution folders are created during build but excluded from source control
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test on both Windows and Linux if possible
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This application is designed to maintain Bluetooth connections with Alexa devices. While it plays silent audio, it may still consume minimal system resources and network bandwidth. Use responsibly and in accordance with your device manufacturer's terms of service.
If you encounter any issues or have questions:
- Check the troubleshooting section
- Review the log files for error messages
- Check the FAQ section below
- Open an issue on GitHub with detailed information about your problem
A: Yes! While designed for Alexa, it works with any Bluetooth device that disconnects due to audio inactivity.
A: Currently the interval is fixed at 5 minutes. You can modify the interval variable in alexa_silencer.py if needed.
A: No, it uses <10MB RAM and <1% CPU. The silent audio is only 10ms every 5 minutes.
A: Absolutely not! The audio is set to 0 volume and is completely silent.
A: Not recommended. One instance is sufficient and multiple instances may conflict.
A: Download the latest version and run it. It will automatically reconfigure the startup settings.
A: Yes! The code is open source, uses standard libraries, and only plays silent audio. No network access or system modifications beyond startup configuration.
A: Use the removal commands in the troubleshooting section, then delete the application folder.
- Operating System: Windows 10+ or Linux (any modern distribution)
- Python: 3.6 or higher (not required for standalone executables)
- Memory: <10 MB RAM usage
- CPU: Minimal impact (<1% CPU usage)
- Storage: <5 MB total footprint
- Audio: Any audio system (no speakers required)
- Detection: Automatically detects your operating system
- Audio Generation: Creates 10ms silent audio files using pygame
- Scheduling: Plays silent audio every 5 minutes (300 seconds)
- Background Operation: Runs completely hidden from user interface
- Startup Integration: Configures automatic startup using:
- Windows: Task Scheduler
- Linux: systemd user services
- β Stable Release - Production ready
- β Cross-Platform - Windows & Linux tested
- β Zero Dependencies - Standalone executables available
- β Open Source - MIT licensed
- β Community Driven - Contributions welcome
See Releases for detailed changelog.
Made with β€οΈ by 0x-Decrypt
β Star this repo if it helped you!