r/FlutterDev • u/tutzalz • 18d ago
Plugin earshot 1.0.0: on-device sound level metering (dB(A), Leq) and sound classification for Flutter. No network, same API on Android, iOS and macOS
Hi r/FlutterDev!
I just released 1.0.0 of earshot, a set of federated Flutter plugins for ambient listening that runs fully on the device.
What it does
Level metering (
earshot_level, pure Dart):- A, C and Z weighting, accurate to ±0.5 dB of IEC 61672 at 10 frequencies
- Fast, Slow and Impulse time weighting
- Leq over the session, 1 s and 60 s
- Calibration offset
Sound classification (
earshot_classifier):- Apple SoundAnalysis on iOS 15+ and macOS 12+
- YAMNet through LiteRT in a background isolate everywhere else
- One
EarshotSoundvocabulary across both backends, with a confidence threshold and smoothing
Capture (
earshot_capture):- float32 mono PCM at 16, 44.1 or 48 kHz
- Unprocessed input (iOS
.measurement, AndroidUNPROCESSED) - Interruptions (calls, Siri, route changes) are handled and capture resumes on its own
earshot_pluginputs it all together:Earshot.listen()gives you one stream of level readings plus the sounds detected, from a single microphone session.
Privacy
- No network calls and no telemetry.
- Audio never leaves the device and is never written to disk.
- The Apple packages ship a privacy manifest.
Performance
YAMNet runs at a p95 of 16.6 ms per window on a Galaxy S20 FE (Android 13).
Why 1.0.0
The public API is now stable. To get there, 1.0.0 cleaned up names (FrequencyWeighting, TimeWeighting and LevelCalibration, because Response clashed with http and dio), added typed ClassifierExceptions, and validates options on every listen. Every package has 100% test coverage, and each decision is written down as an ADR in the repo.
⚠️ earshot is informational and is not a certified detector. Don’t use it in place of a smoke or CO alarm.
More cool stuff is on the way, so stay tuned!
- pub.dev: https://pub.dev/packages/earshot_plugin
- GitHub: https://github.com/4rthurmonteiro/earshot_plugin
I’d love feedback on the API, and to hear what you’d build with it.