From d234bda3908d5580b4773965362e0b3b29d7ded9 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Thu, 1 May 2025 20:51:35 +0545 Subject: [PATCH] feat: add space at the end of transcription result --- VoiceInk/Whisper/WhisperState.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/VoiceInk/Whisper/WhisperState.swift b/VoiceInk/Whisper/WhisperState.swift index 9a50e20..5f7b57a 100644 --- a/VoiceInk/Whisper/WhisperState.swift +++ b/VoiceInk/Whisper/WhisperState.swift @@ -155,8 +155,8 @@ class WhisperState: NSObject, ObservableObject, AVAudioRecorderDelegate { self.isRecording = true self.isVisualizerActive = true } - async let recordingTask = self.recorder.startRecording(toOutputFile: file) - async let windowConfigTask = ActiveWindowService.shared.applyConfigurationForCurrentApp() + async let recordingTask: () = self.recorder.startRecording(toOutputFile: file) + async let windowConfigTask: () = ActiveWindowService.shared.applyConfigurationForCurrentApp() async let modelLoadingTask: Void = { if let currentModel = await self.currentModel, await self.whisperContext == nil { logger.notice("🔄 Loading model in parallel with recording: \(currentModel.name)") @@ -321,6 +321,10 @@ class WhisperState: NSObject, ObservableObject, AVAudioRecorderDelegate { \n\(text) """ } + + // Add a space to the end of the text + text += " " + SoundManager.shared.playStopSound() if AXIsProcessTrusted() { DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {