Real-time AI-powered sound discovery and mixing on your phone
SSYNC listens to the world through your phone's microphone, identifies environmental sounds using spectral AI analysis, and lets you control the volume of each discovered sound category in real-time β like a DJ mixer for reality.
- No hardcoded categories β the AI discovers sounds dynamically
- Real-time spectral analysis identifies: Speech, Singing, Music, Traffic, Bird Song, Wind, Engine Rumble, and more
- New sliders automatically appear when sounds are detected
- Sliders fade out after 8 seconds of silence
- Individual volume control for each discovered sound
- Touch-to-set horizontal sliders with per-category gain
- Glassmorphism dark UI with neon color coding:
- ποΈ Cyan β Voice (Speech, Talking, Whispering)
- π΅ Purple β Music (Keyboard, Singing)
- ποΈ Orange β Urban (Traffic, Engine Rumble, Impact)
- πΏ Green β Nature (Bird Song, Wind)
- Oboe audio engine with
SharingMode::Exclusive+PerformanceMode::LowLatency - 48kHz phone mic for maximum AI accuracy
- C++ DSP pipeline β zero-allocation, lock-free audio processing
- ~64ms classification interval with 300ms consensus voting
- Source Separation (4-stem TFLite model) β separates Voice, Music, Traffic, Nature
- Spectral Classifier β ZCR, spectral centroid, high-frequency ratio analysis
- Consensus Voting β 4-frame window, 50% threshold to prevent false detections
- 5x Digital Pre-Amp for enhanced microphone sensitivity
βββββββββββββββ ββββββββββββββββββββββββββββββββββββββββ
β Phone Mic ββββββΆβ Oboe (48kHz, Exclusive, LowLatency) β
β (Built-in) β ββββββββββββββββ¬ββββββββββββββββββββββββ
βββββββββββββββ β
βΌ
ββββββββββββββββββββββββββββ
β AudioEngine (C++) β
β β
β ββ 5x Pre-Amp βββββββ β
β β processBlock() β β
β ββββββββ¬βββββββββββββ β
β β β
β ββββββββΌβββββββββββββ β
β β Source Separation β β
β β (TFLite 4-stem) β β
β ββββββββ¬βββββββββββββ β
β β β
β ββββββββΌβββββββββββββ β
β β Spectral Features β β
β β ZCR + Centroid β β
β ββββββββ¬βββββββββββββ β
β β β
β ββββββββΌβββββββββββββ β
β β Heuristic Classify β β
β β + Voting Window β β
β ββββββββ¬βββββββββββββ β
β β β
β ββββββββΌβββββββββββββ β
β β Discovery Map β β
β β (mutex-guarded) β β
β βββββββββββββββββββββ β
ββββββββββββββ¬βββββββββββββββ
β JNI Bridge
ββββββββββββββΌβββββββββββββββ
β AudioModule (Java) β
β React Native Bridge β
ββββββββββββββ¬βββββββββββββββ
β JSON
ββββββββββββββΌβββββββββββββββ
β App.tsx (React Native) β
β Dynamic FlatList UI β
β Glassmorphism + Neon β
βββββββββββββββββββββββββββββ
SSYNC/
βββ App.tsx # React Native UI (Discovery Mode)
βββ index.js # Entry point
βββ package.json
βββ android/
β βββ app/
β β βββ build.gradle
β β βββ src/main/
β β βββ AndroidManifest.xml
β β βββ assets/
β β β βββ auramix_model.tflite # ML model
β β βββ java/com/auramixapp/
β β β βββ AudioModule.java # JNI β React bridge
β β β βββ AudioPackage.java # RN package registration
β β β βββ MainActivity.kt
β β β βββ MainApplication.kt
β β βββ cpp/ # C++ Audio Engine
β β β βββ AudioEngine.h # Engine header
β β β βββ AudioEngine.cpp # DSP + AI classifier
β β β βββ AudioBridge.cpp # JNI bridge
β β β βββ OboeAudioStream.h # Oboe header
β β β βββ OboeAudioStream.cpp # Low-latency audio I/O
β β βββ jni/
β β βββ CMakeLists.txt # Build config
β β βββ OnLoad.cpp
β βββ gradle.properties
βββ ml/
βββ train_and_export.py # TFLite model training
- Node.js 18+
- Java JDK 17
- Android SDK (API 33+)
- Android NDK (for C++ compilation)
- Python 3.10+ (for model training only)
- An Android phone with USB debugging enabled
# 1. Clone the repository
git clone https://github.com/EmirhanEtem/SSYNC.git
cd SSYNC
# 2. Install Node dependencies
npm install
# 3. Build and run on device
npx react-native run-android# Bundle JavaScript into the APK
npx react-native bundle \
--platform android --dev false \
--entry-file index.js \
--bundle-output android/app/src/main/assets/index.android.bundle \
--assets-dest android/app/src/main/res/
# Build release APK
cd android && ./gradlew assembleRelease
# Output: android/app/build/outputs/apk/release/app-release.apkcd ml
pip install tensorflow numpy
python train_and_export.py
# Output: auramix_model.tflite β copy to android/app/src/main/assets/| Constant | Default | Description |
|---|---|---|
kSampleRate |
48000 | Microphone sample rate (Hz) |
kInputPreAmp |
5.0 | Digital input gain multiplier |
kClassifyEveryN |
8 | Classify every N audio callbacks |
kVotingWindowSize |
4 | Frames for consensus voting |
kConsensusThreshold |
0.50 | Min vote ratio to confirm detection |
kConfidenceThreshold |
0.35 | Min confidence per detection |
kCooldownMs |
8000 | Time before removing inactive slider |
# View real-time AI detections in Logcat
adb logcat -s AuraMixAI
# Example output:
# AuraMixAI: Detected [Speech: 0.90, Voice: 0.70] | inputDb=-15.2 zcr=0.230
# AuraMixAI: NEW DISCOVERY: [Speech] category=voice confidence=100% votes=4/4| Layer | Technology |
|---|---|
| Frontend | React Native 0.84 (New Architecture) |
| Bridge | JNI (Java β C++) + NativeModules (JS β Java) |
| Audio I/O | Google Oboe (AAudio/OpenSL ES) |
| DSP Engine | Custom C++17, lock-free processing |
| ML Inference | TensorFlow Lite C API |
| Classification | Spectral heuristics (ZCR, Centroid, HFR) |
| Build System | Gradle + CMake + Metro |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - 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.
Emirhan Etem
- GitHub: @EmirhanEtem
Built with β€οΈ and C++ for real-time audio