Built to order

TinyML Baby Cry Detector

This project builds a compact TinyML bedside unit that detects a baby's crying — all classification runs on an ESP32, so no audio ever leaves the room. An I2S MEMS microphone feeds 1-second audio windows to a quantized CNN trained to tell infant crying from background noise; on a confirmed cry the unit chimes, lights an indicator, and shows a cry-duration timer on the OLED, plus a timestamped episode log for spotting patterns. An educational assistive prototype, not a medical or safety-critical monitor. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning and Electronics.

TinyML Baby Cry Detector — project thumbnail preview
More project photos (2)

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

  1. The INMP441 microphone streams 16 kHz audio to the ESP32 over I2S.
  2. Firmware computes log-mel spectrograms over sliding 1-second windows.
  3. The quantized CNN outputs a cry probability per window; probabilities are averaged over 3 seconds for a stable decision.
  4. If the smoothed score exceeds the sensitivity threshold, the chime sounds, the LED lights, and the episode timer starts on the OLED.
  5. When crying stops for 10 continuous seconds, the episode closes and its start time and duration are written to the local log.
  6. 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.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation