A professional-grade sound level meter built with Flutter, providing real-time decibel monitoring, acoustic weighting filters, and recording capabilities β all from your phone's microphone.
- Live dB readings from the device microphone at ~30 FPS polling rate
- Radial gauge with animated needle powered by Syncfusion Flutter Gauges
- Min / Avg / Max tracking with exponential moving average (EMA) smoothing
- Environment classification β contextual labels like "Whisper", "Busy Traffic", "Thunder" based on current noise level
Cycle through three real-time visualization modes:
| Chart | Description |
|---|---|
| Timeline | Rolling ~24-second dB history graph |
| Waveform | Raw PCM amplitude from the microphone membrane |
| FFT Spectrum | Logarithmic frequency spectrum (20 Hz β 20 kHz) with peak frequency annotation |
Professional frequency and time weighting based on IEC 61672-1:2003:
- Frequency Weighting: A (dBA), C (dBC), Z (dBZ)
- Time Weighting: Fast (125 ms), Slow (1 s), Impulse (35 ms rise / 1.5 s decay)
- Adjustable dB offset for hardware calibration against a known reference source
- Save sessions with full metadata (min/max/avg dB, duration, dB history, weighting unit)
- Audio file recording (WAV) via native 32-bit float PCM capture
- Persistent history powered by
hydrated_blocβ recordings survive app restarts - Detail screen with stats card, area chart replay, and built-in audio playback (SoLoud)
- Rename, share, and delete recordings
- Light and dark mode with automatic system detection
- Manual toggle from the app bar
- Material 3 design system with a warm coral (
#E85A3F) primary palette
The app follows BLoC (Business Logic Component) architecture with a clean separation of concerns:
lib/
βββ main.dart # App entry point, theme config, BLoC providers
βββ blocs/
β βββ sound_meter/ # Core audio state management
β β βββ sound_meter_bloc.dart
β β βββ sound_meter_event.dart
β β βββ sound_meter_state.dart
β βββ history/ # Persistent recording history (HydratedBloc)
β β βββ history_bloc.dart
β β βββ history_event.dart
β β βββ history_state.dart
β βββ theme/ # Light/dark mode toggle
β βββ theme_bloc.dart
β βββ theme_event.dart
β βββ theme_state.dart
βββ models/
β βββ recording_model.dart # SoundRecording data model with serialization
βββ screens/
β βββ main_screen.dart # Primary meter + charts UI
β βββ history_screen.dart # Saved recordings list
β βββ detail_screen.dart # Recording detail + audio player
βββ utils/
β βββ sound_utils.dart # Frequency/time weighting math, dB references
βββ widgets/
βββ db_meter.dart # Radial gauge + digital display
βββ charts.dart # Timeline, Waveform, FFT chart widgets
βββ calibration_dialog.dart # dB offset calibration UI
βββ db_legend_dialog.dart # dB reference table dialog
βββ weighting_dialog.dart # Frequency/time weighting picker
- Utility-First Logic β All domain math (weighting filters, EMA calculations) lives in
lib/utils/as static, pure functions for easy unit testing - Semantic Theming β All colors are resolved via
Theme.of(context).colorScheme; no hardcoded color constants in widgets - Reactive State β BLoC pattern with
flutter_blocfor predictable, testable state transitions
| Category | Package | Purpose |
|---|---|---|
| State Management | flutter_bloc / hydrated_bloc |
Reactive BLoC pattern with persistence |
| Audio Capture | flutter_recorder |
Native microphone access (PCM / WAV) |
| Audio Playback | flutter_soloud |
Low-latency audio playback engine |
| Signal Processing | fftea |
Fast Fourier Transform for spectrum analysis |
| Gauges | syncfusion_flutter_gauges |
Radial gauge visualization |
| Charts | syncfusion_flutter_charts |
Timeline, waveform, and FFT charts |
| Permissions | permission_handler |
Runtime microphone permission |
| File System | path_provider / path |
App documents directory management |
| Formatting | intl |
Date/time formatting |
| Sharing | share_plus |
Share recordings externally |
| IDs | uuid |
Unique recording identifiers |
- Flutter SDK
>= 3.11.1 - Android SDK (API 21+)
- A physical device with a microphone (emulators have limited audio support)
# Clone the repository
git clone https://github.com/agnivon/sound_meter.git
cd sound_meter
# Install dependencies
flutter pub get
# Run on a connected device
flutter run# Android APKs (split by ABI for smaller downloads)
flutter build apk --split-per-abi
# Android App Bundle
flutter build appbundleThe project includes a comprehensive test suite covering unit, BLoC, and widget tests:
# Run all tests
flutter test
# Run with coverage
flutter test --coveragetest/
βββ blocs/
β βββ history_bloc_test.dart
β βββ sound_meter_bloc_test.dart
β βββ theme_bloc_test.dart
βββ screens/
β βββ detail_screen_test.dart
β βββ history_screen_test.dart
β βββ main_screen_test.dart
βββ utils/
β βββ sound_utils_test.dart
βββ widgets/
βββ calibration_dialog_test.dart
βββ db_meter_test.dart
βββ weighting_dialog_test.dart
| RECORD_AUDIO | Android | Microphone access for sound measurement |
The app requests microphone permission at startup. All audio processing is performed on-device β no data is transmitted externally.
This project is licensed under the MIT License β see the LICENSE file for details.
- Syncfusion for their excellent Flutter gauge and chart libraries
- flutter_recorder for native audio capture
- SoLoud for high-performance audio playback
- IEC 61672-1:2003 standard for acoustic weighting filter formulae