Skip to main content

earshot_plugin 1.0.0 copy "earshot_plugin: ^1.0.0" to clipboard
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, TimeWeighting and LevelCalibration, and LevelOptions.timeWeighting (ADR 0025).
  • Map an ArgumentError, such as invalid classifier options, to EarshotErrorCode.unknown instead of modelUnavailable (ADR 0026).
  • Breaking: ClassifierBackend.auto is removed. Leave ClassifierOptions.backend unset to let earshot pick the backend (ADR 0023).
  • Map a ClassifierException to the EarshotErrorCode of the same name (ADR 0024).
  • Document that EarshotErrorCode can gain values in a minor version, and show a switch with a wildcard case (ADR 0021).

0.2.0 #

  • Earshot.listen classifies 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, and apple never fails with sampleRateConflict.

0.1.0 #

  • Earshot.listen now listens: one capture subscription feeds the level meter and, with the YAMNet backend, the classifier, and the stream emits EarshotEvents. 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. The apple backend, and auto on iOS and macOS, use EarshotClassifier.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 level and classifier to null gives a stream that closes at once.
  • Stream errors are EarshotExceptions, and the stream closes after the first one. CaptureException codes, UnsupportedErrors and classifier failures map to EarshotErrorCodes.
  • Add EarshotErrorCode.sampleRateConflict.
  • Add EarshotException.cause, an optional third positional argument that keeps the original error. It takes part in == and hashCode.
  • Document the timestamps of EarshotEvent and the 16 kHz default capture rate of EarshotOptions.capture.
  • Accept the 0.1.x releases of earshot_capture, earshot_classifier and earshot_level.
  • Tests build LevelReading with the new leq1s and leq60s fields of earshot_level.
  • Add the earshot banner to the README.

0.0.1 #

  • Initial API preview.
5
likes
160
points
340
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

On-device ambient listening for Flutter. Sound level in dB(A) and sound classification in one stream. No network.

Repository (GitHub)
View/report issues
Contributing

Topics

#audio #decibel #sound-classification #microphone

License

MIT (license)

Dependencies

earshot_capture, earshot_classifier, earshot_level, flutter, meta

More

Packages that depend on earshot_plugin