
Audio Noise Level Monitoring
Recording and analysis for ambient in-home noise.
It gets loud inside our house. This is partly due to the hardwood floors, but mostly because of two kids running around, playing, and laughing. I was curious about how loud it actually gets, so I built this project to find out.
The noise monitor consists of two main scripts: the logger and the dashboard.
The Logger Script
The logger script is responsible for capturing and recording noise levels in real time. It utilizes the built-in microphone on my MacBook Air to measure ambient noise and processes it using Python.
Key Features:
- Records microphone input continuously.
- Computes a rolling one-second average decibel level.
- Converts raw audio data into decibel readings.
- Logs noise data into a CSV file for analysis.
- Includes a graceful exit that displays session statistics:
- Loudest Noise Recorded: The maximum decibel level detected.
- Average Noise Level: The mean decibel reading over the session.
- Standard Deviation: The variation in noise levels over time.
The Dashboard
The dashboard provides a real-time visualization of the noise levels. It is built using Dash, a Python framework for data visualization.
Features of the Dashboard:
- Displays real-time data from the CSV file.
- Uses a color-coded volume indicator:
- Green (Safe): Below 40 dB
- Yellow (Moderate): 40 - 60 dB
- Red (Too Loud!): 80 dB and above
- Updates dynamically as new noise data is logged.
How It Works
Both scripts run in separate terminal windows. The logger continuously records noise levels and appends them to a CSV file, while the dashboard reads and visualizes this data in real time. The dashboard can be accessed in a web browser for monitoring.
Next Steps
Possible enhancements for the project include:
- Adding historical trend analysis for noise levels over time.
- Setting up alerts when noise exceeds a certain threshold.
- Deploying the system on a Raspberry Pi for 24/7 monitoring.
Stay tuned for updates as I continue improving the noise monitoring system!