我正在尝试测试firefox的 webspeech-api,但在控制台中遇到错误,提示ReferenceError: SpeechRecognition is not defined。
我什至在 about:config 中启用media.webspeech.recognition.enable
和media.webspeech.synth.enabled
标记。
有没有办法让SpeechRecognition在 Firefox 上工作?
我正在尝试测试firefox的 webspeech-api,但在控制台中遇到错误,提示ReferenceError: SpeechRecognition is not defined。
我什至在 about:config 中启用media.webspeech.recognition.enable
和media.webspeech.synth.enabled
标记。
有没有办法让SpeechRecognition在 Firefox 上工作?
根据Chris Mills(Mozilla 的高级技术作家)在 2016 年 1 月 21 日发表的这篇博文,您还不能在 FF 的网络环境中使用它...
...因为允许用户授予应用程序使用权限的 UX/UI 尚未实现。
...
这是您可以投票的错误报告。
目前,您必须在chrome
环境(扩展)中才能使用它。
链接的错误报告已标记为已修复。
要在Firefox Nightly > 72中启用 SpeechRecognition ,请转到about:config
并将标志media.webspeech.recognition.enable
和切换media.webspeech.recognition.force_enable
为 true。
但请注意,这是一项在线服务,这意味着您需要互联网连接。