A super lightweight baby sound monitor server for RaspberryPi or IoT devices in python
^ do anyone want to spend $$$ on baby sleep tracking devices when you have Raspberry Pi Zero ($10) and a microphone.
python and...
from http.server import BaseHTTPRequestHandler
import ctypes
import http.server
import json
import multiprocessing as mp
import numpy as np
import pyaudio
import socketserver
import time
git clone https://github.com/dcluomax/SoundMonitoringServer.git
cd SoundMonitoringServer
cd src
nohup python main.py &
by default http://localhost:8080/
you can change it to your desired port in main.py
register it as a service if you like.
data leverages https://developers.google.com/chart/interactive/docs/reference#datatable-class
you can filter on noise level, calculate last quiet time, or count noise timespan as you desire. In fact, changes to this file is recommended.