fix dead lock in say verb while waiting playback-stop and say verb is killed (#742)

This commit is contained in:
Hoan Luu Huu
2024-05-05 19:12:29 +07:00
committed by GitHub
parent dfe623e78a
commit e7bc0b0737

View File

@@ -364,6 +364,8 @@ class TaskSay extends TtsTask {
} }
this.ep.removeAllListeners('playback-start'); this.ep.removeAllListeners('playback-start');
this.ep.removeAllListeners('playback-stop'); this.ep.removeAllListeners('playback-stop');
// if we are waiting for playback-stop event, resolve the promise
if (this._playResolve) this._playResolve();
} }
} }