Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
fix(audio): retry direct capture after fallback
altic-dev3b7b22b2982f
diff --git a/Sources/Fluid/Services/ASRService.swift b/Sources/Fluid/Services/ASRService.swiftindex 1a63302a..16148e24 100644--- a/Sources/Fluid/Services/ASRService.swift+++ b/Sources/Fluid/Services/ASRService.swift@@ -611,7 +611,6 @@ final class ASRService: ObservableObject {private var directAudioInput: DirectCoreAudioInput?private var activeAudioCaptureBackend: AudioCaptureBackend = .none- private var directCaptureIncompatibleDeviceIDs: Set<AudioObjectID> = []private var isFallingBackFromDirectCapture = falseprivate var hasPreparedAudioCapture: Bool {@@ -741,14 +740,6 @@ final class ASRService: ObservableObject {DebugLogger.shared.warning("No input device is available for direct capture", source: "ASRService")return false}- guard self.directCaptureIncompatibleDeviceIDs.contains(device.id) == false else {- DebugLogger.shared.warning(- "Skipping direct Core Audio input for '\(device.name)' after a runtime capture mismatch",- source: "ASRService"- )- return false- }-if let directAudioInput = self.directAudioInput,directAudioInput.deviceID == device.id{@@ -874,9 +865,6 @@ final class ASRService: ObservableObject {self.isFallingBackFromDirectCapture = truedefer { self.isFallingBackFromDirectCapture = false }- if let deviceID = self.directAudioInput?.deviceID {- self.directCaptureIncompatibleDeviceIDs.insert(deviceID)- }let failureCount = SettingsStore.shared.directAudioCaptureConsecutiveFailures + 1SettingsStore.shared.directAudioCaptureConsecutiveFailures = failureCountlet shouldDisable = Self.directCaptureShouldDisable(afterFailureCount: failureCount)diff --git a/Sources/Fluid/Services/NotificationService.swift b/Sources/Fluid/Services/NotificationService.swiftindex 312e0170..e0922581 100644--- a/Sources/Fluid/Services/NotificationService.swift+++ b/Sources/Fluid/Services/NotificationService.swift@@ -146,7 +146,7 @@ enum NotificationService {content.body = "FluidVoice detected malformed microphone audio three times and switched to the compatibility audio path. You can turn it back on in Settings."} else {content.title = "Microphone audio recovered"- content.body = "FluidVoice detected malformed audio and switched this session to the compatibility audio path. Faster Recording Start will retry after restart. (\(failureCount)/3)"+ content.body = "FluidVoice detected malformed audio and switched this session to the compatibility audio path. Faster Recording Start will retry next recording. (\(failureCount)/3)"}content.sound = nilcontent.userInfo = [UserInfoKey.kind: Kind.audioCaptureFallback]