diff --git a/VoiceInk.xcodeproj/project.pbxproj b/VoiceInk.xcodeproj/project.pbxproj index 923b999..b18cb26 100644 --- a/VoiceInk.xcodeproj/project.pbxproj +++ b/VoiceInk.xcodeproj/project.pbxproj @@ -448,7 +448,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 121; + CURRENT_PROJECT_VERSION = 123; DEVELOPMENT_ASSET_PATHS = "\"VoiceInk/Preview Content\""; DEVELOPMENT_TEAM = V6J6A3VWY2; ENABLE_HARDENED_RUNTIME = YES; @@ -463,7 +463,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.21; + MARKETING_VERSION = 1.23; PRODUCT_BUNDLE_IDENTIFIER = com.prakashjoshipax.VoiceInk; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -481,7 +481,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 121; + CURRENT_PROJECT_VERSION = 123; DEVELOPMENT_ASSET_PATHS = "\"VoiceInk/Preview Content\""; DEVELOPMENT_TEAM = V6J6A3VWY2; ENABLE_HARDENED_RUNTIME = YES; @@ -496,7 +496,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.21; + MARKETING_VERSION = 1.23; PRODUCT_BUNDLE_IDENTIFIER = com.prakashjoshipax.VoiceInk; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/VoiceInk/Models/CustomPrompt.swift b/VoiceInk/Models/CustomPrompt.swift index 598a1a3..4333886 100644 --- a/VoiceInk/Models/CustomPrompt.swift +++ b/VoiceInk/Models/CustomPrompt.swift @@ -17,13 +17,13 @@ enum PromptIcon: String, Codable, CaseIterable { case briefcaseFill = "briefcase.fill" // Technical - case codeFill = "chevron.left.forwardslash.chevron.right.fill" + case codeFill = "curlybraces" case terminalFill = "terminal.fill" case gearFill = "gearshape.fill" // Content case blogFill = "doc.text.image.fill" - case notesFill = "note.text" + case notesFill = "note" case bookFill = "book.fill" case bookmarkFill = "bookmark.fill" case pencilFill = "pencil.circle.fill" @@ -31,7 +31,7 @@ enum PromptIcon: String, Codable, CaseIterable { // Media & Creative case videoFill = "video.fill" case micFill = "mic.fill" - case musicFill = "music.note.list" + case musicFill = "music.note" case photoFill = "photo.fill" case brushFill = "paintbrush.fill" diff --git a/VoiceInk/Recorder.swift b/VoiceInk/Recorder.swift index 7dc4036..21faebf 100644 --- a/VoiceInk/Recorder.swift +++ b/VoiceInk/Recorder.swift @@ -95,6 +95,7 @@ class Recorder: ObservableObject { } catch { logger.error("Failed to create audio file: \(error.localizedDescription)") await mediaController.unmuteSystemAudio() + stopRecording() throw RecorderError.couldNotStartRecording } @@ -161,6 +162,7 @@ class Recorder: ObservableObject { try engine!.start() } catch { await mediaController.unmuteSystemAudio() + stopRecording() throw RecorderError.couldNotStartRecording } } diff --git a/VoiceInk/Whisper/WhisperState+ModelManager.swift b/VoiceInk/Whisper/WhisperState+ModelManager.swift index dc496e0..c18c398 100644 --- a/VoiceInk/Whisper/WhisperState+ModelManager.swift +++ b/VoiceInk/Whisper/WhisperState+ModelManager.swift @@ -291,19 +291,15 @@ extension WhisperState { recorder.stopRecording() try? await Task.sleep(nanoseconds: 500_000_000) - let canCleanup = !isRecording && !isProcessing - - if canCleanup { - await whisperContext?.releaseResources() - whisperContext = nil - isModelLoaded = false - } + await whisperContext?.releaseResources() + whisperContext = nil + isModelLoaded = false } // MARK: - Helper Methods private func logError(_ message: String, _ error: Error) { - messageLog += "\(message): \(error.localizedDescription)\n" + logger.notice("\(message): \(error.localizedDescription)\n") } } @@ -373,4 +369,4 @@ struct DownloadProgressView: View { .padding(.vertical, 4) .animation(.smooth, value: totalProgress) } -} \ No newline at end of file +}