Skip to content

Commit

Permalink
Update speech2device.js
Browse files Browse the repository at this point in the history
fix for issue #299
  • Loading branch information
neopholus committed Mar 16, 2024
1 parent d5f933e commit b2d921e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/speech2device.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ class Speech2Device {
count++;
// We are checking every 500 ms, expected length of playback is defined in variable duration in seconds
// Thus, we have to count to duration*2 to be able to wait long enough for the expected playback duration.
// We add an additional second, to cover delays before the playback starts.
if (count > (duration+1)*2) {
// We add two additional seconds, to cover delays before the playback starts.
if (count > (duration+2)*2) {
clearInterval(intervalHandler);
intervalHandler = null;
this.adapter.log.error(`Error while checking if ${chromecastAnnouncementDev} finished playing announcement: ${announcementJSON}: TIMEOUT`);
Expand Down

0 comments on commit b2d921e

Please sign in to comment.