在Mozilla Firefox上启用Web Speech API

Vic*_*ira 7 javascript permissions firefox mozilla google-chrome

我一直在使用Chrome上的语音/语音合成,然后我意识到Firefox默认不允许它,并且必须授予特殊权限.

通过阅读本文,我可以进行测试工作:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API

Firefox桌面和移动设备支持Gecko 44+,没有前缀,可以通过在about:config中将media.webspeech.recognition.enable标志翻转为true来打开它.但是,权限设置/ UI尚未排序,因此用户无法授予权限使用权限,因此无法使用.这将很快修复.

测试在以下链接中:

http://mdn.github.io/web-speech-api/speak-easy-synthesis/

但我想知道当我们去我的应用程序时,如何在我的客户端浏览器上允许它?例如,我们如何要求不同的权限并允许media.webspeech.synth.enabled

Nic*_*lay 1

作为更新,语音合成在 Firefox 49+ (2016-09) 中启用。

截至 2019 年,向网络公开语音识别的工作正在进行中(请参阅错误 1248897)。更新:截至 2021 年,该 bug 已被关闭,但该功能仍默认未启用

https://caniuse.com/#search=speech