earshot_classifier_darwin 1.0.0
earshot_classifier_darwin: ^1.0.0 copied to clipboard
The iOS and macOS implementation of earshot_classifier, backed by Apple's on-device SoundAnalysis.
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: SoundAnalysis failures are delivered as a
ClassifierExceptioninstead of aCaptureExceptionwithCaptureErrorCode.unknown:unsupportedwhen SoundAnalysis cannot run on the OS or at the sample rate, andmodelUnavailablewhen it fails while classifying (ADR 0024).
0.2.0 #
- SoundAnalysis now classifies PCM from
earshot_capture, so classification and capture share one microphone tap (ADR 0018). The plugin no longer runs anAVAudioEngine, reads the microphone permission or touches the iOS audio session. - Add
classify(pcm, config), which accepts every sample rate.detections(config)classifies 16 kHz PCM fromearshot_capture, so it fails withsampleRateConflictwhile capture runs at another rate. - Detection timestamps follow the PCM clock and jump over interruptions. Capture errors reach the stream unchanged.
- Remove the classifier's copy of
EarshotAudioSession.swift.
0.1.0 #
- Follow the new
EarshotClassifierPlatformAPI (isAvailable,detections(ClassifierConfig)). - Implement the Apple SoundAnalysis backend on iOS 15+ and macOS 12+:
SNClassifySoundRequest(version 1) on anAVAudioEngineinput tap, through Pigeon.autonow picks it on iOS and macOS. - Each
listen()gets its own analyzer session; concurrent sessions share one input tap. Cancelling the last one releases the microphone. - Stream errors are
CaptureExceptions (permissionDenied,audioUnavailable,unknown). Classification never prompts for the microphone permission. - Handle interruptions as
earshot_capturedoes: the engine restarts after calls, Siri, media services resets and device changes. - On iOS, share the app's audio session with the other earshot plugin: stopping capture or classification no longer stops the other (ADR 0017).
0.0.1 #
- Initial API preview.