From 4b919818798d24de1cd5800020d1c0fa0bf37060 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Fri, 1 Aug 2025 20:19:43 +0545 Subject: [PATCH] Conditional delay for stop sound --- VoiceInk/Whisper/WhisperState.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VoiceInk/Whisper/WhisperState.swift b/VoiceInk/Whisper/WhisperState.swift index db06558..7008860 100644 --- a/VoiceInk/Whisper/WhisperState.swift +++ b/VoiceInk/Whisper/WhisperState.swift @@ -224,7 +224,10 @@ class WhisperState: NSObject, ObservableObject { // Play stop sound when transcription starts with a small delay Task { - try? await Task.sleep(nanoseconds: 100_000_000) // 100 milliseconds delay + let isSystemMuteEnabled = UserDefaults.standard.bool(forKey: "isSystemMuteEnabled") + if isSystemMuteEnabled { + try? await Task.sleep(nanoseconds: 200_000_000) // 200 milliseconds delay + } await MainActor.run { SoundManager.shared.playStopSound() }