bugfix: azure stt - if we get no speech detected, listen again

This commit is contained in:
Dave Horton committed 2022-04-13 12:07:30 -04:00
1 parent 6330b0d443
commit 29dec24095
2 files changed
+8 -2

No files matched your search

+3
View File
@@ -105,6 +105,7 @@ class WsRequestor extends BaseRequestor {
/* save the message info for reply */
const startAt = process.hrtime();
this.messagesInFlight.set(msgid, {
timer,
success: (response) => {
clearTimeout(timer);
const rtt = this._roundTrip(startAt);
@@ -135,6 +136,8 @@ class WsRequestor extends BaseRequestor {
}
for (const [msgid, obj] of this.messagesInFlight) {
const {timer} = obj;
clearTimeout(timer);
obj.failure(`abandoning msgid ${msgid} since we have closed the socket`);
}
this.messagesInFlight.clear();