Move stop sound to transcription start

This commit is contained in:
Beingpax 2025-08-01 18:17:19 +05:45
parent 04a1c305a4
commit a97d0107af
2 changed files with 8 additions and 6 deletions

View File

@ -155,11 +155,6 @@ class Recorder: ObservableObject {
// Complete system audio operations first
await mediaController.unmuteSystemAudio()
await playbackController.resumeMedia()
// Then play stop sound on main thread after audio operations are complete
await MainActor.run {
SoundManager.shared.playStopSound()
}
}
deviceManager.isRecordingActive = false
}

View File

@ -171,7 +171,6 @@ class WhisperState: NSObject, ObservableObject {
await MainActor.run {
self.recordingState = .recording
SoundManager.shared.playStartSound()
}
await ActiveWindowService.shared.applyConfigurationForCurrentApp()
@ -227,6 +226,14 @@ class WhisperState: NSObject, ObservableObject {
recordingState = .transcribing
}
// Play stop sound when transcription starts with a small delay
Task {
try? await Task.sleep(nanoseconds: 100_000_000) // 100 milliseconds delay
await MainActor.run {
SoundManager.shared.playStopSound()
}
}
defer {
if shouldCancelRecording {
Task {