Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ This project uses semantic versioning for public releases. Use `MAJOR.MINOR.PATC
- `MINOR` changes add user-visible features and improvements.
- `PATCH` changes fix bugs, polish existing behavior, or make small internal improvements.

## [Unreleased]

### Improved

- Faster stop-to-paste latency: the transcription upload now starts immediately when recording stops, instead of waiting for the audio capture session to finish tearing down.

## [1.1.0] - 2026-06-03

### Added
Expand Down
8 changes: 7 additions & 1 deletion Sources/AudioRecorder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,12 @@ final class AudioRecorder: NSObject, ObservableObject, AVCaptureAudioDataOutputS

sessionQueue.async {
self.cancelWatchdog()
self.teardownSessionLocked()
// Removing the delegate is the audio cut-off point (same as the
// full teardown used to be); the queued tail buffers are then
// drained into the file. The slow AVCaptureSession.stopRunning()
// is deferred until after the completion fires, so transcription
// starts without waiting on capture teardown.
self.audioDataOutput?.setSampleBufferDelegate(nil, queue: nil)
let outputURL = self.finishAudioFileLocked(discard: false)
self._recording.withLock { $0 = false }
self.liveLevelNormalizerLock.withLock { $0.reset() }
Expand All @@ -689,6 +694,7 @@ final class AudioRecorder: NSObject, ObservableObject, AVCaptureAudioDataOutputS
self.audioLevel = 0.0
completion(outputURL)
}
self.teardownSessionLocked()
}
}

Expand Down