Move stop sound to transcription start
This commit is contained in:
parent
04a1c305a4
commit
a97d0107af
@ -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
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user