The problem
New parents buy Wi-Fi baby monitors that stream audio to the cloud around the clock — expensive, subscription-tied, and a privacy worry in the nursery. This project takes the opposite approach: a small bedside ESP32 unit listens locally and recognizes the acoustic signature of an infant cry with a TinyML model, alerting only when crying is actually detected. Because inference happens on the microcontroller, there is no account, no app pairing and no audio upload; the unit works on a shelf with just a USB charger. The build covers the full TinyML pipeline honestly — dataset curation from a public infant-cry corpus, mel-spectrogram features, model quantization, and false-alarm testing against everyday household sounds.
How it works
- The INMP441 microphone streams 16 kHz audio to the ESP32 over I2S.
- Firmware computes log-mel spectrograms over sliding 1-second windows.
- The quantized CNN outputs a cry probability per window; probabilities are averaged over 3 seconds for a stable decision.
- If the smoothed score exceeds the sensitivity threshold, the chime sounds, the LED lights, and the episode timer starts on the OLED.
- When crying stops for 10 continuous seconds, the episode closes and its start time and duration are written to the local log.
- Sensitivity levels adjust the decision threshold; all settings persist across power cycles.
Tech stack:
- ESP32 (dual-core Xtensa, 520 KB SRAM)
- INMP441 I2S MEMS microphone
- TensorFlow Lite Micro, INT8 quantized CNN
- 0.96" SSD1306 OLED, chime buzzer, status LED
- Donate-a-cry corpus — training reference
- Python training pipeline (librosa, TensorFlow)
Dataset & model details
- Dataset: The Donate-a-cry corpus — a public research dataset of infant cry recordings collected for cry-classification studies — used as the training/evaluation reference for the cry class; household background sounds (speech, TV, appliances) form the negative class. The report documents the corpus's size, recording conditions and its limits.
- Task: 1-second audio-window binary classification (infant cry vs background); input = 40×49 log-mel spectrogram, output = cry probability per window, smoothed over 3 s.
- Model: Small CNN (two conv blocks + dense head, ~30 KB after INT8 quantization), TensorFlow Lite Micro on ESP32 (design target).
- Metrics: Window-level precision/recall and false alarms per day on held-out clips — reported as design targets in the build notes, with the actual measured figures recorded during the buyer-run nursery test. No accuracy is claimed as measured until that run. Educational/assistive prototype; no medical or safety-critical claims.
| Parameter | Value |
|---|---|
| MCU | ESP32, 240 MHz dual-core, 520 KB SRAM |
| Microphone | INMP441 I2S MEMS, 16 kHz sampling |
| Model | Small CNN, INT8 TFLite Micro, ~30 KB (design target) |
| Window | 1 s log-mel (40 mels × 49 frames), 3 s smoothing |
| Alert | Soft chime + LED; episode timer on OLED |
| Sensitivity | 3 levels (low/medium/high), persisted in flash |
| Range | Designed for a single room, ~3–5 m (design target) |
| Power | 5 V USB; continuous mains operation |
| Safety status | Assistive prototype — NOT a safety-critical monitor |
Project features
- [On-device cry classification] A quantized CNN scores 1-second audio windows on the ESP32 — no cloud, no streaming, no audio leaves the nursery.
- [Cry vs noise discrimination] Trained to separate infant crying from TV, talking, fans and traffic noise, with multi-second confirmation to reject brief sounds.
- [Gentle local alerts] A soft chime plus LED indicator on confirmed crying — no harsh siren near the baby.
- [Cry-duration timer] The OLED shows how long the current episode has lasted and a count of today's episodes.
- [Episode log] Timestamps of cry episodes are stored locally so parents can review patterns over days.
- [Adjustable sensitivity] A button cycles low/medium/high sensitivity for different room sizes and noise floors.
- [Training pipeline included] Python scripts for dataset prep, training and TFLite Micro conversion ship with the project.
What is included
- Assembled detector unit: ESP32 + microphone + OLED + chime + LED
- Complete firmware (audio pipeline, inference, alerts, log)
- Quantized TFLite Micro model + Python training/conversion pipeline
- Wiring diagram and nursery placement guide
- Project report PDF (TinyML background, dataset documentation, methodology, nursery test procedure, results, safety disclaimer)
- PPT presentation for final review
- Viva Q&A preparation document (CNN, quantization, mel features, precision/recall, false alarms)
Limitations & prerequisites
- Detection performance is a design target until the buyer's nursery test — loud siblings, barking dogs and TV at high volume will challenge it, documented in the report.
- This is an assistive educational prototype, NOT a safety-critical baby monitor — it must never be the sole supervision for an infant, stated plainly.
- Designed for one room (~3–5 m); it cannot monitor through closed doors or across a house.
- The model recognizes crying sounds, not distress causes — hunger, discomfort and pain sound similar to the classifier.
- Continuous mains power is assumed; there is no battery backup in the base build.
- Like all ML classifiers, it can miss real cries (false negatives) — the report discusses this failure mode honestly.
Frequently Asked Questions
Does it send audio anywhere?
No. All classification happens on the ESP32 in the room. No Wi-Fi account, no cloud, no audio upload — the unit only keeps episode timestamps.
Which dataset is used?
The Donate-a-cry corpus, a public research dataset of infant cry recordings, as the training/evaluation reference for the cry class, with household sounds as the negative class.
Can it replace a baby monitor?
No. It is an assistive educational prototype, not a safety-critical monitor, and must never be the sole supervision for an infant. That boundary is stated in the report.
How accurate is it?
Window-level precision/recall and false alarms per day are design targets. The report includes a nursery test procedure you run yourself, and the achieved figures are recorded there.
How far away does it hear?
It is designed for a single room, roughly 3–5 m from the crib. Closed doors and heavy background noise reduce reliability.
Is this project suitable for a final-year project?
Yes — for AI & Machine Learning and Electronics programs. It demonstrates the complete TinyML workflow from dataset to quantized on-device inference with honest evaluation. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning and Electronics.
Components & software requirements
- ESP32 (dual-core Xtensa, 520 KB SRAM)
- INMP441 I2S MEMS microphone
- TensorFlow Lite Micro, INT8 quantized CNN
- 0.96" SSD1306 OLED, chime buzzer, status LED
- Donate-a-cry corpus — training reference
- Python training pipeline (librosa, TensorFlow)
Dataset & model details
- Dataset: The Donate-a-cry corpus — a public research dataset of infant cry recordings collected for cry-classification studies — used as the training/evaluation reference for the cry class; household background sounds (speech, TV, appliances) form the negative class. The report documents the corpus's size, recording conditions and its limits.
- Task: 1-second audio-window binary classification (infant cry vs background); input = 40×49 log-mel spectrogram, output = cry probability per window, smoothed over 3 s.
- Model: Small CNN (two conv blocks + dense head, ~30 KB after INT8 quantization), TensorFlow Lite Micro on ESP32 (design target).
- Metrics: Window-level precision/recall and false alarms per day on held-out clips — reported as design targets in the build notes, with the actual measured figures recorded during the buyer-run nursery test. No accuracy is claimed as measured until that run. Educational/assistive prototype; no medical or safety-critical claims.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.