Skip to content

Commit

Permalink
Merge pull request #223 from DanilSaidov/fix/auto_listening
Browse files Browse the repository at this point in the history
fix: add error handling for auto listening
  • Loading branch information
sasha-tlt authored Feb 20, 2025
2 parents b97adc6 + a12ad28 commit 5432647
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/assistantSdk/voice/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ export const createVoice = (
emit({ tts: { status: 'stop', messageId: Number(mesId), appInfo: appInfoDict[mesId] } });

if (mesId === autolistenMessageId) {
listen();
listen().catch((error) => {
// eslint-disable-next-line no-console
console.error(error);
});
}

// очистка сохраненных appInfo и messageId
Expand Down Expand Up @@ -357,7 +360,10 @@ export const createVoice = (
if (settings.current.disableDubbing === false) {
autolistenMessageId = messageId;
} else {
listen({}, autoListening);
listen({}, autoListening).catch((error) => {
// eslint-disable-next-line no-console
console.error(error);
});
}
}
}),
Expand Down

0 comments on commit 5432647

Please sign in to comment.