Note
Stable (1.0.0). Capture, level metering and sound classification work on Android, iOS and macOS. The public API follows semantic versioning: breaking changes only come in a major version (ADR 0021). The feature checklist shows what each version added.
On-device ambient listening for Flutter. earshot tells your app how loud it is, in dB(A) with Leq and calibration, and what is sounding, through sound classification. It has the same API on Android, iOS and macOS.
- earshot never uses the network and sends no telemetry.
- Audio never leaves the device and is never written to disk.
- Reading the microphone permission status never prompts the user.
- The Apple packages ship a privacy manifest that declares no data collection and no tracking.
Your app owns the microphone usage declarations: NSMicrophoneUsageDescription in the iOS and macOS Info.plist, plus the com.apple.security.device.audio-input entitlement on macOS. Android's RECORD_AUDIO is merged into your manifest, and your app still asks the user at runtime.
earshot is informational and is not a certified detector. Never rely on it for safety. In particular, it must not replace a certified smoke or carbon monoxide alarm.
Most apps need only earshot_plugin, or earshot_level if they just want a sound level meter.
| Package | What it does | pub.dev |
|---|---|---|
earshot_plugin |
Level and classification in one stream | |
earshot_capture |
Microphone → float32 PCM, permission status | |
earshot_level |
Pure Dart dB metering: weighting, Leq, calibration | |
earshot_classifier |
Sound classification (SoundAnalysis, YAMNet) | |
earshot_capture_platform_interface |
Capture platform interface | |
earshot_capture_android |
Capture on Android | |
earshot_capture_darwin |
Capture on iOS and macOS | |
earshot_classifier_platform_interface |
Classifier platform interface | |
earshot_classifier_darwin |
SoundAnalysis on iOS and macOS |
An item is ticked (- [x]) in the same pull request that implements it. The version that first ships it is appended on release, for example (0.1.0).
Workspace
- Melos 8 on Dart pub workspaces, with one lockfile (0.0.1)
- CI: analyze, format, 100% test coverage, generated-code check, Android example build (0.0.1)
- Swift Package Manager and CocoaPods support for the Apple packages (0.0.1)
earshot_capture
- Microphone permission status (Android, iOS, macOS) (0.0.1)
earshot_capture
- Microphone permission request (0.1.0)
- PCM float32 mono stream at 16 / 44.1 / 48 kHz (Android, iOS, macOS) (0.1.0)
- Capture state changes (0.1.0)
- Interruption handling (calls, Siri, Android input silencing) with auto-resume, without taking audio focus (0.1.0)
- Unprocessed input (iOS
.measurementmode, AndroidUNPROCESSEDwithVOICE_RECOGNITIONfallback) (0.1.0)
earshot_level
- A and Z weighting (IEC 61672, ±0.5 dB at 10 frequencies) (0.1.0)
- C weighting (0.1.0)
- Fast / Slow / Impulse response (0.1.0)
- Leq (session, 1 s, 60 s) (0.1.0)
- Calibration offset (0.1.0)
earshot_classifier
- YAMNet backend via LiteRT, in an isolate (every platform) (0.1.0)
- Apple SoundAnalysis backend (iOS 15+, macOS 12+) (0.1.0)
- Backend selection (
auto,apple,yamnet) (0.1.0) - Sound vocabulary (
EarshotSound) with validated label mapping (0.1.0) - Confidence threshold and smoothing (N hits within T seconds) (0.1.0)
earshot_plugin
-
Earshot.listencombining level and classification (0.1.0) -
EarshotExceptionerror codes on stream errors (0.1.0)
- SoundAnalysis fed from the shared capture tap (single microphone session) (0.2.0)
- Release automation with
melos versionand Conventional Commits (0.2.0) - pana checks in CI (0.2.0)
- Stable public API (1.0.0)
- Performance measured on real devices (YAMNet under 50 ms per window on a mid-range Android device) (1.0.0)
See CONTRIBUTING.md. Architecture decisions are recorded in docs/adr/.