earshot_classifier 1.0.0
earshot_classifier: ^1.0.0 copied to clipboard
On-device sound classification for Flutter, with Apple SoundAnalysis and YAMNet backends. 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).
- Add a Galaxy S20 FE (Android 13) to the YAMNet performance table: p95 of 16.6 ms per window, against a target of 50 ms.
- Breaking:
detections()andclassify()validate their options on each listen, in every build: aminConfidenceoutside 0 to 1 (or NaN) or aSmoothing.hitsbelow 1 fails the stream with anArgumentErrorbefore anything starts. Release builds used to accept them silently (ADR 0026). - Breaking:
ClassifierOptions.backendis now nullable and defaults tonull, which picks the backend asClassifierBackend.autodid.autois removed: drop the argument or passnull(ADR 0023). - Breaking: classifier streams deliver a
ClassifierExceptionwhen the backend fails, and still forward aCaptureExceptionfrom capture unchanged. Theapplebackend off iOS and macOS fails withClassifierErrorCode.unsupportedinstead of anUnsupportedError, and a YAMNet model that fails to load or run fails withmodelUnavailable(ADR 0024). - Document YAMNet performance per window, measured with the benchmark in the example app (ADR 0022).
- Document that
EarshotSound,SoundGroupandClassifierBackendcan gain values in a minor version, and show aswitchwith a wildcard case (ADR 0021).
0.2.0 #
EarshotClassifier.classify(pcm)now picks the backend likedetections():apple, andautoon iOS and macOS when SoundAnalysis is available, run SoundAnalysis on the given PCM.appleno longer errors there.- The
applebackend ofdetections()captures withearshot_captureinstead of opening its own microphone session.
0.1.0 #
- BREAKING:
EarshotClassifier.detections()now classifies. It picks the backend fromClassifierOptions.backend, drops detections belowminConfidenceand appliesSmoothing. - Add the
yamnetbackend: YAMNet float32 through LiteRT (flutter_litert) in a background isolate, on Android, iOS and macOS. The model is bundled as an asset (seeTHIRD_PARTY_NOTICES.md). - Add backend selection:
autouses the platform backend on iOS and macOS when it is available, and YAMNet otherwise. - Add
EarshotClassifier.classify(Stream<PcmChunk>)to classify PCM the app already captures. PCM at 44.1 or 48 kHz is resampled to 16 kHz. - Export
EarshotSoundandSoundVocabulary.
0.0.1 #
- Initial API preview.