-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cognitive Speech Services sample throws a runtime error in Chrome #1848
Comments
@xiaolangxyz looks like your problem is related to #1823. |
On the other hand, https://webchat-playground.azurewebsites.net/ works, while |
@compulim are we reassigning this one to you? |
Took this now. |
Today, we have a workaround for this particular Chrome bug:
Expected: speaking is falsy, then turn to truthy, then receive "start" event, and audio is played Our workaround is, if we did not receive "start" event within a second, we will cancel and restart, up to 2 times. Since this workaround applies to both Chrome and non-Chrome (Cognitive Services), thus, if Cognitive Services took more than 1 second to fetch/decode the audio, we would think it is bugged and we restart it. Leading to some long text to fail synthesizing. I tested Chrome 74 and Edge "Anaheim" 76 and seems this bug no longer repro. Will try more browsers and if still not repro-ing, will remove this workaround. And next time, we shouldn't applies a workaround too broad, we should limit the workaround by building a new polyfill instead. I am using the HTML below, then repetitively click "Speak" and "Cancel" button. <!DOCTYPE html>
<html lang="en-US">
<head>
<title>Speech</title>
</head>
<body>
<button class="speak">Speak</button>
<button class="cancel">Cancel</button>
<p class="pending">Pending: <span class="value"></span></p>
<p class="speaking">Speaking: <span class="value"></span></p>
<script>
document.querySelector('button.speak').addEventListener('click', () => {
speechSynthesis.speak(new SpeechSynthesisUtterance('A quick brown fox jumped over the lazy dogs.'));
});
document.querySelector('button.cancel').addEventListener('click', () => {
speechSynthesis.cancel();
});
setInterval(() => {
document.querySelector('.pending > .value').innerHTML = speechSynthesis.pending + '';
document.querySelector('.speaking > .value').innerHTML = speechSynthesis.speaking + '';
}, 100);
</script>
</body>
</html> |
In order to verify the fix:
|
Fix is verified in #2035. It will be officially released for 4.5 in July. If you need this fix immediately, please build master into a locally hosted version of Web Chat. |
Hi, I am still getting this same issue in chrome 77. Also, after this, the speech recognizer is not starting. I am manually canceling the voice since I need to stop it once user presses a button, after that this issue is happening. Is it a known bug? |
@alokraj68 Thank you for bringing this to our attention. I am going to file another issue since this appears to be a slightly different bug. #2469 |
I was unable to reproduce this issue in Edge or Firefox
Reproductions steps:
We are still investigating the cause of this bug. Please feel free to add a +1 and the details of your experience to this issue.
Notes:
The text was updated successfully, but these errors were encountered: