earshot_plugin 1.0.0
earshot_plugin: ^1.0.0 copied to clipboard
On-device ambient listening for Flutter. Sound level in dB(A) and sound classification in one stream. No network.
Changelog #
1.0.0 #
- First stable release. The public API follows semantic versioning from now on: breaking changes only in a major version (ADR 0021).
- Breaking: the re-exported level types are renamed:
FrequencyWeighting,TimeWeightingandLevelCalibration, andLevelOptions.timeWeighting(ADR 0025). - Map an
ArgumentError, such as invalid classifier options, toEarshotErrorCode.unknowninstead ofmodelUnavailable(ADR 0026). - Breaking:
ClassifierBackend.autois removed. LeaveClassifierOptions.backendunset to let earshot pick the backend (ADR 0023). - Map a
ClassifierExceptionto theEarshotErrorCodeof the same name (ADR 0024). - Document that
EarshotErrorCodecan gain values in a minor version, and show aswitchwith a wildcard case (ADR 0021).
0.2.0 #
Earshot.listenclassifies the shared capture stream with every backend, so Apple SoundAnalysis no longer opens a second microphone session (ADR 0018). Detections share the capture clock with level readings, andapplenever fails withsampleRateConflict.
0.1.0 #
Earshot.listennow listens: one capture subscription feeds the level meter and, with the YAMNet backend, the classifier, and the stream emitsEarshotEvents. With level metering on, each level reading is an event that carries the sounds confirmed since the previous one. With it off, each confirmed sound is an event. Theapplebackend, andautoon iOS and macOS, useEarshotClassifier.detections(), which runs its own microphone session in 0.1.0.- Cancelling a subscription stops capture, the level meter and the classifier; pausing it pauses them. Setting both
levelandclassifiertonullgives a stream that closes at once. - Stream errors are
EarshotExceptions, and the stream closes after the first one.CaptureExceptioncodes,UnsupportedErrors and classifier failures map toEarshotErrorCodes. - Add
EarshotErrorCode.sampleRateConflict. - Add
EarshotException.cause, an optional third positional argument that keeps the original error. It takes part in==andhashCode. - Document the timestamps of
EarshotEventand the 16 kHz default capture rate ofEarshotOptions.capture. - Accept the 0.1.x releases of
earshot_capture,earshot_classifierandearshot_level. - Tests build
LevelReadingwith the newleq1sandleq60sfields ofearshot_level. - Add the earshot banner to the README.
0.0.1 #
- Initial API preview.