Getting started
Install & first launch
DeltaSleep is distributed as a standard Android APK. No Play Store account or Google Services are required.
- Download the latest deltasleep-v*.apk from the GitHub Releases page.
- On your phone, go to Settings → Apps → Special app access → Install unknown apps and allow your browser or file manager to install APKs.
- Open the downloaded file and tap Install.
- Launch DeltaSleep. You will be prompted for microphone and notification permissions on the first run.
Permissions
DeltaSleep requests exactly three permissions — no more, ever. Here is why each one is needed:
INTERNET permission is intentionally absent from the app. The manifest is verified on every CI run — the build will fail if it is ever added. Your audio analysis stays on your device.
Tracking
Starting a session
Open DeltaSleep and tap Start Sleep on the home screen.
- The app requests microphone permission if not yet granted.
- A foreground service starts and a persistent notification appears in your notification shade — this is normal and expected.
- The DSP library calibrates to the ambient noise level of your room for the first few seconds.
- The screen navigates automatically to the Active Sleep screen and tracking begins.
Active sleep screen
While tracking is running the app displays a real-time view of the audio signals being processed. The screen is kept on so you can glance at it before you fall asleep.
Understanding the live charts
The Live signal chart shows three separate signals for the last three minutes. Each is a smoothed line updated roughly every two seconds:
- Audio level — overall microphone RMS energy. Spikes when you move or speak.
- Sound texture — zero-crossing rate. High values indicate high-frequency content (e.g. breathing, rustling).
- Snore band — spectral band power in the 20–300 Hz range. Elevated when snore-like sounds are present.
The Phase history chart scrolls automatically to the right edge as new epochs arrive. Each column is one 30-second epoch. A faint pink overlay on a column means a snore event was recorded for that epoch.
Stopping a session
Tap the red Stop Tracking button at the bottom of the active screen. You can also stop from the persistent notification by tapping Stop.
The app immediately finalises the last epoch, closes the foreground service, and navigates to the Session screen where you can review your night.
Your results
Session screen
After stopping, DeltaSleep shows three headline numbers at the top:
- Sleep time — total session duration from start to stop.
- Snore % — percentage of epochs in which snoring was detected.
- Deep % — percentage of epochs classified as deep sleep.
Reading the hypnogram
The hypnogram is a horizontal bar chart where the x-axis is clock time and colour represents the detected sleep stage. Time labels are shown below the chart every five minutes.
The chart scrolls horizontally for long sessions. Pinch-to-zoom is not yet supported — pan by swiping left and right.
Sleep stats
The three stat cards are computed entirely on-device from the epoch data stored in the local SQLite database. No server calculation, no sync required.
Feel rating
Below the hypnogram, tap a number from 1 (terrible) to 5 (great) to record how rested you felt. This is stored with the session and included in CSV exports so you can correlate subjective quality with objective sleep data over time.
Data & export
Export CSV
Tap Export CSV on the session screen. Android's system file picker opens, letting you choose any folder — Downloads, a USB drive, a cloud folder you have mounted locally — wherever you want the file.
The exported file is named deltasleep_<session_id>.csv and contains one row per 30-second epoch:
The format is plain UTF-8 CSV with a header row. It opens in Excel, Google Sheets, R, Python pandas, or any other tool you prefer. DeltaSleep never owns your data — once exported, the file is yours.
band_power vs time to see snore patterns. Compare deep % across nights against your feel rating. Use the open format to build your own dashboard — that is exactly what it is designed for.
Delete all data
Scroll to the bottom of the home screen and tap Delete all data. A confirmation dialog appears. Tapping Delete will:
- Overwrite every byte of the SQLite database file with zeros.
- Delete the now-blank database file.
- Clear all session and epoch records from the app's UI.
Individual sessions cannot currently be deleted without deleting all data. Per-session deletion is planned for v0.2.
Data retention
DeltaSleep currently keeps all sessions indefinitely until you manually delete them. Configurable auto-retention (30 / 90 / 365 days) is planned for a future release.
Tips & troubleshooting
Phone placement
The microphone is typically located at the bottom edge of the phone. For best results:
- On the mattress: Place the phone face-down near your pillow. The mic picks up mattress vibrations and breathing sounds clearly.
- Nightstand: Works well if within 50–80 cm (20–30 inches). Accuracy decreases beyond 1 m.
- Avoid covering the mic: Do not put the phone under a pillow — muffled audio will reduce phase detection accuracy.
- Case matters: Thick silicone cases covering the bottom mic port reduce sensitivity. Remove the case or flip it so the mic is uncovered.
Battery usage
DeltaSleep targets ≤ 3% battery drain per 8-hour night. The mic duty-cycles — it sleeps for ~20% of each analysis window when no events are detected, reducing CPU and radio wake-ups.
- Keep the phone plugged in overnight if possible — the charging cable also keeps the phone from moving, which reduces false-positive movement events.
- Enable Do Not Disturb before sleeping. Incoming calls and notifications do not interrupt tracking, but screen-on events from notifications consume battery.
- If your phone's battery optimisation kills the foreground service, go to Settings → Apps → DeltaSleep → Battery and set it to Unrestricted.
Music, podcasts & white noise
DeltaSleep uses Android's AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK strategy combined with the mix-with-others audio session, so it does not request exclusive microphone ownership. Spotify, Audible, YouTube Music, white-noise apps, and sleep-sound apps all continue playing normally while tracking is active.
The DSP pipeline includes a voice-activity detector (VAD) tuned to distinguish human speech and snoring from music and spoken-word content. If you play audio with heavy bass (e.g. binaural beats in the 20–300 Hz range), snore detection accuracy may decrease — consider raising the snore sensitivity threshold when listening to such content.
Frequently asked questions
/data/data/io.github.ntufar.deltasleep/databases/). It is not accessible to other apps or visible in the system file picker. Uninstalling the app removes it.