Repository navigation
Transcribe a selected audio track in local video and media - #56
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 149545c. Configure here.
| do { | ||
| try Task.checkCancellation() | ||
| guard inputProviderPreference == .automatic else { | ||
| throw MediaTranscriptionConfigurationError() |
There was a problem hiding this comment.
Private error skips SpeechSessionError
Medium Severity
A non-automatic inputProviderPreference now throws private MediaTranscriptionConfigurationError instead of SpeechSessionError. Callers that catch SpeechSessionError (as the public docs describe) miss this failure, and the type is not visible outside the module so it cannot be handled by name.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 149545c. Configure here.
| let detached = detachTranscriberState() | ||
| await stopScreenCaptureStreamingIfNeeded() | ||
| await finalizeDetachedTranscriberState(detached) | ||
| await finalizeDetachedTranscriberState(detached, cancelAnalysis: cancelMediaAnalysis) |
There was a problem hiding this comment.
Stop cancel limited to media
High Severity
cleanup now calls cancelAndFinishNow() only when streamingMode is .mediaPlayback. finalizeAndFinishThroughEndOfInput() waits for input that never arrives if setup is cancelled before the analyzer is started, so stopTranscribing() can hang for live or file sessions during preparing (including model download). The hang test was retargeted to media, so that path is no longer covered.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 149545c. Configure here.


Add
streamTranscription(fromMediaFile:audioTrackID:options:)for local video and audio on iOS and macOS 27. A caller can select anAVAssetTrackby ID or use the first audio track. AuralKit preserves media timestamps, rejects external references and invalid track IDs, and closes the stream when the analyzer receives no samples. File read errors reach the caller even when cancelling the Speech results reader makes it return normally.Targeted for 2.2. In a real Mac run using a two-track MP4, the public API transcribed the first track at 0.00 s and the second at 1.92 s, with distinct text and the session returning to idle both times. All 66 package tests, strict SwiftLint, and both demo builds passed.