mirror of
https://github.com/home-assistant/android
synced 2024-07-09 04:15:51 +00:00
Stop TTS playback on new Assist pipeline run (#3778)
This commit is contained in:
parent
256835a380
commit
cea54d6895
|
@ -249,6 +249,8 @@ class AssistViewModel @Inject constructor(
|
|||
return
|
||||
}
|
||||
|
||||
stopPlayback()
|
||||
|
||||
val recording = try {
|
||||
recorderProactive || audioRecorder.startRecording()
|
||||
} catch (e: Exception) {
|
||||
|
@ -269,6 +271,7 @@ class AssistViewModel @Inject constructor(
|
|||
|
||||
private fun runAssistPipeline(text: String?) {
|
||||
val isVoice = text == null
|
||||
stopPlayback()
|
||||
|
||||
val userMessage = AssistMessage(text ?: "…", isInput = true)
|
||||
_conversation.add(userMessage)
|
||||
|
|
|
@ -224,6 +224,8 @@ class ConversationViewModel @Inject constructor(
|
|||
return
|
||||
}
|
||||
|
||||
stopPlayback()
|
||||
|
||||
val recording = try {
|
||||
recorderProactive || audioRecorder.startRecording()
|
||||
} catch (e: Exception) {
|
||||
|
@ -244,6 +246,7 @@ class ConversationViewModel @Inject constructor(
|
|||
|
||||
private fun runAssistPipeline(text: String?) {
|
||||
val isVoice = text == null
|
||||
stopPlayback()
|
||||
|
||||
val userMessage = AssistMessage(text ?: "…", isInput = true)
|
||||
_conversation.add(userMessage)
|
||||
|
|
Loading…
Reference in New Issue
Block a user