vue-speech-streaming
vue-speech-streaming copied to clipboard
Chrome requires a user gesture (such as clicking on the page) before the AudioContext can be used.
Using google chrome as browser, and a current/fresh build from master branch I get this error in browser console:
Speech.vue?6eec:64 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu eval @ Speech.vue?6eec:64
Line 64 in Speech.vue is the one right after the script tag:
<script>
var audioContext = new(window.AudioContext || window.webkitAudioContext)();
And the link (https://goo.gl/7K7WLu) resolves to: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes which explains that as of December 2018 Chrome requires a user gesture (such as clicking on the page) before the AudioContext can be used.
So... until that is fixed the demo doesn't seem to work in Chrome out of the box (doesn't work in Firefox either possibly due to same or other issues, I'm not sure).
I guess I'll see if there is an easy fix but thought I'd start by filing the issue first in case someone already has a fix for this...