在 Mozilla Firefox 上启用 Web Speech API

2024-01-02

我一直在 Chrome 上使用语音/语音合成,然后我意识到 Firefox 默认情况下不允许这样做,必须授予特殊权限。

通过阅读这篇文章,我可以使测试工作:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API 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/ http://mdn.github.io/web-speech-api/speak-easy-synthesis/

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


作为更新,语音合成 http://mdn.github.io/web-speech-api/speak-easy-synthesis/在 Firefox 49+ (2016-09) 中启用。

截至 2019 年,向网络公开语音识别的工作正在进行中(请参阅错误 1248897 https://bugzilla.mozilla.org/show_bug.cgi?id=1248897). Update:截至 2021 年,该错误已被修复,但该功能仍然存在默认情况下未启用 https://bugzilla.mozilla.org/show_bug.cgi?id=1248897#c102.

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Mozilla Firefox 上启用 Web Speech API 的相关文章

随机推荐