Preview
Open Original
Sound Monitor - Noise Pollution Documentation Tool
I hate loud cars so I made an application LOG WHEN THEY ARE TOO LOUD.
Professional Statatment:
An app for monitoring, recording, and documenting noise pollution to present evidence to city councils or other authorities.
GUI
| | | | | | | | | | | |
Features
Audio Recording & Storage
- Continuous Recording: Records audio continuously from your selected microphone
Sound Detection & Logging
- Real-time Decibel Monitoring: Tracks sound levels continuously
- Low-Frequency Detection: Specifically identifies low-frequency noise like car rumble (20-200 Hz)
Install
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install python3-pyaudio portaudio19-dev ffmpeg
macOS:
``โฆ
Sound Monitor - Noise Pollution Documentation Tool
I hate loud cars so I made an application LOG WHEN THEY ARE TOO LOUD.
Professional Statatment:
An app for monitoring, recording, and documenting noise pollution to present evidence to city councils or other authorities.
GUI
| | | | | | | | | | | |
Features
Audio Recording & Storage
- Continuous Recording: Records audio continuously from your selected microphone
Sound Detection & Logging
- Real-time Decibel Monitoring: Tracks sound levels continuously
- Low-Frequency Detection: Specifically identifies low-frequency noise like car rumble (20-200 Hz)
Install
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install python3-pyaudio portaudio19-dev ffmpeg
macOS:
brew install portaudio ffmpeg
Windows:
- Download and install FFmpeg
- PyAudio wheels available via pip
Python Dependencies
pip install -r requirements.txt
Usage
Starting the Application
python run.py
File Organization
The application creates the following structure at runtime:
sound-monitor/
โโโ sound_monitor.py # Main application (1030+ lines, handles GUI, audio processing, database)
โโโ run.py # Launcher script with dependency checks
โโโ requirements.txt # Python dependencies
โโโ setup.py # Installation script
โโโ test_sound_monitor.py # Test suite
โโโ example_demo.py # Demo with sample data
โ
โโโ recordings/ # Audio recordings directory (created at runtime)
โ โโโ YYYYMMDD_HHMMSS.mp3 # Regular 1-minute audio segments
โ โโโ event_YYYYMMDD_HHMMSS_ffffff.mp3 # Detected loud events with pre/post buffers
โ โโโ temp_*.wav # Temporary WAV files (cleaned up after MP3 conversion)
โ
โโโ videos/ # Video recordings directory (created at runtime, optional)
โ โโโ event_YYYYMMDD_HHMMSS_ffffff.mp4 # Video recordings of loud events (if enabled)
โ โโโ ...
โ
โโโ sound_events.db # SQLite database with event logs
โโโ events table:
- id (PRIMARY KEY)
- timestamp (event time)
- duration (event length in seconds)
- peak_db (highest dB level)
- avg_db (average dB level)
- filename (audio file path)
- video_filename (optional video file path)
- low_frequency (boolean, car rumble detection)
Technical Details
- Sample Rate: 44.1 kHz
- Format: 16-bit PCM (recording), MP3 64kbps (storage)
- Channels: Mono
- Chunk Size: 1024 samples
- Segment Duration: 60 seconds
- dB Calculation: RMS-based, referenced to max int16 value, calibrated to ~94 dB SPL
- Low-Frequency Detection: FFT-based, 20-200 Hz range, >40% energy threshold
Support
For issues, questions, or suggestions, please open an issue on GitHub.