在Mozilla Firefox上启用Web Speech API [英] Enable Web Speech API on Mozilla Firefox

查看:94
本文介绍了在Mozilla Firefox上启用Web Speech API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've been working with the voice/speech synthesis on Chrome and then I realized Firefox doesn't allow it by default and special permissions must be granted.

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

By reading this article I could make the test work:

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

Firefox桌面和移动设备在Gecko 44+中支持它,没有前缀,可以通过在about:config中将media.webspeech.recognitiontion.enable标志翻转为true来启用它.但是,权限设置/UI尚未整理,因此用户无法授予使用权限的权限,因此无法使用.这将很快得到解决.

Firefox desktop and mobile support it in Gecko 44+, without prefixes, and it can be turned on by flipping the media.webspeech.recognition.enable flag to true in about:config. The permissions settings/UI haven't yet been sorted out however, so permission can't be granted to use it by the user, so it can't be used. This will be fixed soon.

测试在此链接中:

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

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

But I wonder how I could allow it on my client's browser when they go to my app? How do we ask for different permissions and allow, for example, media.webspeech.synth.enabled?

推荐答案

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

As an update, Speech Synthesis is enabled in Firefox 49+ (2016-09).

截至2019年,正在进行将语音识别公开到网络的工作(请参见错误1248897 )

Work on exposing Speech Recognition to the web is ongoing as of 2019 (see bug 1248897)

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

这篇关于在Mozilla Firefox上启用Web Speech API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆