mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Make sure stt_binary_handler_id is reset (#16360)
This commit is contained in:
parent
2fb1dd0ec1
commit
edc6da04f7
@ -401,6 +401,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
this._audioBuffer = [];
|
this._audioBuffer = [];
|
||||||
const userMessage: Message = {
|
const userMessage: Message = {
|
||||||
who: "user",
|
who: "user",
|
||||||
@ -463,6 +464,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.type === "run-end") {
|
if (event.type === "run-end") {
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
unsub();
|
unsub();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,6 +511,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
// Send empty message to indicate we're done streaming.
|
// Send empty message to indicate we're done streaming.
|
||||||
this._sendAudioChunk(new Int16Array());
|
this._sendAudioChunk(new Int16Array());
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
}
|
}
|
||||||
this._audioBuffer = undefined;
|
this._audioBuffer = undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user