diff --git a/VoiceInk/Services/TranscriptionOutputFilter.swift b/VoiceInk/Services/TranscriptionOutputFilter.swift index 71548e5..d4bac9d 100644 --- a/VoiceInk/Services/TranscriptionOutputFilter.swift +++ b/VoiceInk/Services/TranscriptionOutputFilter.swift @@ -15,7 +15,6 @@ struct TranscriptionOutputFilter { "hmm", "hm", "mmm", "mm", "mh", "ha", "ehh" ] static func filter(_ text: String) -> String { - logger.notice("๐Ÿงน Filtering hallucinations and filler words") var filteredText = text // Remove ... blocks @@ -48,11 +47,11 @@ struct TranscriptionOutputFilter { // Log results if filteredText != text { - logger.notice("โœ… Removed hallucinations and filler words") + logger.notice("๐Ÿ“ Output filter result: \(filteredText)") } else { - logger.notice("โœ… No hallucinations or filler words found") + logger.notice("๐Ÿ“ Output filter result (unchanged): \(filteredText)") } return filteredText } -} \ No newline at end of file +} diff --git a/VoiceInk/Whisper/WhisperState.swift b/VoiceInk/Whisper/WhisperState.swift index 4689eca..af46a0e 100644 --- a/VoiceInk/Whisper/WhisperState.swift +++ b/VoiceInk/Whisper/WhisperState.swift @@ -293,7 +293,9 @@ class WhisperState: NSObject, ObservableObject { let transcriptionStart = Date() var text = try await transcriptionService.transcribe(audioURL: url, model: model) + logger.notice("๐Ÿ“ Raw transcript: \(text)") text = TranscriptionOutputFilter.filter(text) + logger.notice("๐Ÿ“ Output filter result: \(text)") let transcriptionDuration = Date().timeIntervalSince(transcriptionStart) let powerModeManager = PowerModeManager.shared @@ -307,10 +309,12 @@ class WhisperState: NSObject, ObservableObject { if UserDefaults.standard.object(forKey: "IsTextFormattingEnabled") as? Bool ?? true { text = WhisperTextFormatter.format(text) + logger.notice("๐Ÿ“ Formatted transcript: \(text)") } if UserDefaults.standard.bool(forKey: "IsWordReplacementEnabled") { text = WordReplacementService.shared.applyReplacements(to: text) + logger.notice("๐Ÿ“ WordReplacement: \(text)") } let audioAsset = AVURLAsset(url: url) @@ -340,6 +344,7 @@ class WhisperState: NSObject, ObservableObject { do { let (enhancedText, enhancementDuration, promptName) = try await enhancementService.enhance(textForAI) + logger.notice("๐Ÿ“ AI enhancement: \(enhancedText)") transcription.enhancedText = enhancedText transcription.aiEnhancementModelName = enhancementService.getAIService()?.currentModel transcription.promptName = promptName