An Android app that downloads apps and applies ReVanced patches to customize them, built on ReVanced Patcher.
AhmadHassan-BTed/AhSilence
An Android active noise cancellation engine in Kotlin that detects low-frequency hums with FFT and plays phase-inverted audio to cancel them.
- Stars
- 1,684
- Forks
- 2
- Open issues
- 5
- Last commit
- last month
What is it?
AhSilence is a native Android active noise cancellation (ANC) app built with Jetpack Compose and Kotlin. It targets persistent low-frequency sounds such as AC units or electrical drones. The app records ambient audio, runs a custom Cooley-Tukey radix-2 FFT to find the dominant frequency, and then emits an inverted sine wave so the two waves interfere destructively.
Users can adjust the phase offset with a 360-degree calibration dial to compensate for hardware or Bluetooth latency, and set amplitude with a gain slider. A Pro mode exposes these controls, while a Simple mode offers a reduced interface. Cancellation runs in a foreground service with a persistent notification, so it keeps working when the screen is locked.
The project follows Clean Architecture, with a Kotlin-only domain layer isolated from Android framework code. The project notes that it works fully offline without network calls or telemetry. It requires a physical Android device with a microphone, since emulators do not support the low-latency audio testing it needs. Minimum supported version is Android 8.0 (API 26).
Key features
- 01Detects the dominant low-frequency hum from microphone audio using a custom radix-2 FFT.
- 02Plays phase-inverted sine waves to cancel the detected frequency.
- 03360-degree phase dial to compensate for hardware or Bluetooth latency.
- 04Amplitude gain slider with Pro and Simple interface modes.
- 05Foreground service keeps cancellation running while the screen is locked.
- 06Fully offline, with no network calls or telemetry.
Use cases
- Reducing a constant air conditioner or fan hum while sleeping or working.
- Studying how FFT-based frequency detection and anti-phase audio work on Android.
- Reference implementation of Clean Architecture in a real-time audio Android app.
Quick start
- 1
Clone the repository
git clone https://github.com/ahmadhassan-bted/ahsilence.git - 2
Enter the project folder
cd ahsilence - 3
Build the debug APK
./gradlew clean assembleDebug - 4
Install on a connected physical Android device
./gradlew installDebug
Things to know
- Requires a physical Android device; emulators are not supported for microphone FFT testing.
- Requires Android Studio Ladybug or newer and JDK 21+ to build.
- Targets Android 8.0 (API 26) and above only.
- Only handles persistent low-frequency hums; multi-frequency and adaptive cancellation are still on the roadmap.
Topics
FAQ
- What is AhSilence?
- An Android active noise cancellation engine in Kotlin that detects low-frequency hums with FFT and plays phase-inverted audio to cancel them. AhSilence is a native Android active noise cancellation (ANC) app built with Jetpack Compose and Kotlin. It targets persistent low-frequency sounds such as AC units or electrical drones. The app records ambient audio, runs a custom Cooley-Tukey radix-2 FFT to find the dominant frequency, and then emits an inverted sine wave so the two waves interfere destructively.
- Is AhSilence free to use? What license does it have?
- AhSilence is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is AhSilence still maintained?
- Updated within 6 months. The last commit to AhSilence was on Sep 15, 2026.
- What can I use AhSilence for?
- Reducing a constant air conditioner or fan hum while sleeping or working. Studying how FFT-based frequency detection and anti-phase audio work on Android. Reference implementation of Clean Architecture in a real-time audio Android app.
- How do I install AhSilence?
- Clone the repository: git clone https://github.com/ahmadhassan-bted/ahsilence.git Enter the project folder: cd ahsilence Build the debug APK: ./gradlew clean assembleDebug Install on a connected physical Android device: ./gradlew installDebug
- Where can I get AhSilence?
- The source code and installation instructions are on GitHub: https://github.com/AhmadHassan-BTed/AhSilence
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An Android image editor app with dozens of tools, from crop and draw to 500+ filters, OCR, background removal, and PDF tools.
A local, offline file converter for Android that handles video, audio, image, PDF, Office, font and subtitle conversion on the device without uploads.
Offline, privacy-first PDF toolkit for Android that merges, splits, compresses, converts, signs and annotates PDFs entirely on-device.
A cross-platform app store that lets you discover and install apps released on GitHub, Codeberg and other Forgejo or Gitea forges.
An offline-first, privacy-focused reader for PDF, EPUB, comics and other documents on Android, Linux and Windows, built with Kotlin Multiplatform.