diff --git a/VoiceInk/Services/NativeAppleTranscriptionService.swift b/VoiceInk/Services/NativeAppleTranscriptionService.swift index 06754ca..ddbcf45 100644 --- a/VoiceInk/Services/NativeAppleTranscriptionService.swift +++ b/VoiceInk/Services/NativeAppleTranscriptionService.swift @@ -62,7 +62,6 @@ class NativeAppleTranscriptionService: TranscriptionService { throw ServiceError.unsupportedOS } - #if canImport(Speech) && compiler(>=6.0) && swift(>=6.0) logger.notice("Starting Apple native transcription with SpeechAnalyzer.") let audioFile = try AVAudioFile(forReading: audioURL) @@ -141,14 +140,8 @@ class NativeAppleTranscriptionService: TranscriptionService { logger.notice("Native transcription successful. Length: \(finalTranscription.count) characters.") return finalTranscription - - #else - logger.error("SpeechTranscriber is not available in this compiler version or Speech framework is not available") - throw ServiceError.unsupportedOS - #endif } - #if compiler(>=6.0) && swift(>=6.0) @available(macOS 26, *) private func deallocateExistingAssets() async throws { #if canImport(Speech) @@ -159,9 +152,7 @@ class NativeAppleTranscriptionService: TranscriptionService { logger.notice("Deallocated existing asset locales.") #endif } - #endif - #if compiler(>=6.0) && swift(>=6.0) @available(macOS 26, *) private func allocateAssetsForLocale(_ locale: Locale) async throws { #if canImport(Speech) @@ -174,9 +165,7 @@ class NativeAppleTranscriptionService: TranscriptionService { } #endif } - #endif - #if compiler(>=6.0) && swift(>=6.0) @available(macOS 26, *) private func ensureModelIsAvailable(for transcriber: SpeechTranscriber, locale: Locale) async throws { #if canImport(Speech) @@ -196,5 +185,4 @@ class NativeAppleTranscriptionService: TranscriptionService { } #endif } - #endif }