Log never handled speech indexes, and don't make the speech queue lag behind #9946
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Related to #9937
Summary of the issue:
From the speech manager docs:
_handleIndex
calls_removeCompletedFromQueue
for the specified index. However, that code did check whethercurrentIndex >= lastCommand.index
. In the case where the speech synthesizer sometimes doesn't send a notification for an index, this means the following:_removeCompletedFromQueue
removes the sequence from the queue that is associated with the missed index, thereby ignoring the current index._removeCompletedFromQueue
checks the missed index to see whether it is the index for the end of an utterance.Description of how this pull request fixes the issue:
Log cases of indexes we missed, and clean up the sequences for the missed indexes.
Testing performed:
Tested with #9937 that it did no longer stop speaking with espeak, which tends to miss indexes.
Known issues with pull request:
It really looks like espeak's index handling is slightly buggy.
Change log entry:
None