VoiceWake: skip send chime when nothing to send
This commit is contained in:
@@ -137,7 +137,7 @@ actor VoicePushToTalk {
|
|||||||
forward = await MainActor.run { AppStateStore.shared.voiceWakeForwardConfig }
|
forward = await MainActor.run { AppStateStore.shared.voiceWakeForwardConfig }
|
||||||
}
|
}
|
||||||
|
|
||||||
if let chime = self.activeConfig?.sendChime, chime != .none {
|
if !finalText.isEmpty, let chime = self.activeConfig?.sendChime, chime != .none {
|
||||||
await MainActor.run { VoiceWakeChimePlayer.play(chime) }
|
await MainActor.run { VoiceWakeChimePlayer.play(chime) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ actor VoiceWakeRuntime {
|
|||||||
committed: finalTranscript,
|
committed: finalTranscript,
|
||||||
volatile: "",
|
volatile: "",
|
||||||
isFinal: true)
|
isFinal: true)
|
||||||
if config.sendChime != .none {
|
if !finalTranscript.isEmpty, config.sendChime != .none {
|
||||||
await MainActor.run { VoiceWakeChimePlayer.play(config.sendChime) }
|
await MainActor.run { VoiceWakeChimePlayer.play(config.sendChime) }
|
||||||
}
|
}
|
||||||
await MainActor.run {
|
await MainActor.run {
|
||||||
|
|||||||
Reference in New Issue
Block a user