This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
π€ SnoreLab
What I Built
I built SnoreLab, a privacy-first local AI tool for detecting and analyzing snoring from audio recordings.
I built it for my roommate, whose snoring can make it difficult to sleep. Instead of sending bedroom audio to a cloud service, SnoreLab processes the recording locally and produces a timeline of detected snoring, episode statistics, and an AI-generated summary.
The idea was simple: solve a real problem while keeping a sensitive recording private.
SnoreLab can answer questions like:
- How much of the recording was classified as snoring?
- How many snoring episodes were detected?
- How long was the longest episode?
- What did the overall recording look like?
It is a personal analysis tool, not a medical device or diagnostic system.
Demo
π₯ Watch the SnoreLab demo on YouTube
The demo shows the complete workflow from selecting an audio recording to local AI analysis, snoring detection, episode visualization, and the verified Gemma summary.
Code
π» GitHub Repository
The entire project is open source and can be run locally.
How I Built It
SnoreLab is built around local AI inference rather than a cloud AI API.
The pipeline looks like this:
Local audio
β
FFmpeg preprocessing
β
16 kHz mono audio
β
~1 second windows
β
YAMNet embeddings
β
Logistic Regression classifier
β
Snoring timeline + episode analysis
β
Derived statistics
β
Local Gemma 3 1B
β
Verified AI summary
YAMNet
I use Google's YAMNet as the audio representation model.
Each audio window is converted into a 1024-dimensional embedding, which is then passed to a lightweight Logistic Regression classifier trained to distinguish snoring from non-snoring audio.
Across five sample-level validation splits, the YAMNet-based pipeline achieved:
99.4% Β± 0.2% accuracy
This is a prototype benchmark on a limited dataset, not a claim of real-world or clinical accuracy. The dataset also contains duplicate samples and does not provide enough metadata for subject-independent evaluation.
Local Gemma
For the natural-language summary, SnoreLab uses Gemma 3 1B through Ollama.
Gemma never receives the raw audio.
Instead, it receives only six derived statistics:
- Recording duration
- Total detected snoring duration
- Percentage of the recording classified as snoring
- Number of snoring episodes
- Average episode duration
- Longest episode duration
Gemma is required to return these values in a structured JSON response. SnoreLab verifies that the returned values match the original deterministic statistics before displaying the summary.
If Gemma is unavailable or its response fails validation, SnoreLab falls back to a deterministic summary.
Privacy by Design
The audio stays on the user's machine.
There is no cloud audio upload and no external AI inference API involved in the analysis pipeline.
The raw recording is processed locally, and Gemma only sees the derived statistics needed to generate the summary.
Why Does Open Innovation Matter?
This project would be fundamentally different if I had built it around a closed cloud AI API.
Snoring recordings are sensitive. Sending them to a remote service just to answer something as simple as "how much did I snore?" felt unnecessary.
Open AI models made it possible to bring the intelligence to the data instead.
With local models and open tooling, I could:
- Run audio inference on my own machine
- Inspect and modify the processing pipeline
- Experiment with different models
- Keep raw recordings local
- Combine specialized AI models with traditional machine learning
- Run a language model locally without sending personal audio to a third party
For me, open innovation isn't just about having access to source code or model weights.
It makes it possible to build AI applications where privacy, experimentation, and control are part of the architecture rather than afterthoughts.
What My Friend Thought
After building SnoreLab, I showed it to the person I built it for, my roommate.
His reaction was basically: βWait, you actually built something to detect my snoring?β
He found the timeline and episode breakdown useful because it made it easy to see not just whether snoring happened, but when it happened and for how long.
The biggest takeaway was that the project solved an actual problem for someone I know, rather than being an AI demo built just to showcase a model.
Prize Categories
Gemma
SnoreLab uses Gemma 3 1B locally to generate verified natural-language summaries from the detected snoring statistics.
The model runs locally through Ollama, keeping the audio analysis workflow private.
Top comments (0)