Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #299 #307

Merged
merged 3 commits into from
May 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/speech2device.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ class Speech2Device {
let count = 0;
let intervalHandler = setInterval(async () => {
count++;
if (count > 20) {
// 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 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
Loading