Shu*_*ari 7 chromium text-to-speech
当我运行我的代码时,Chromium 没有发出声音,而这在 chrome 中工作。
var msg = new SpeechSynthesisUtterance('Hello World');
window.speechSynthesis.speak(msg);
Run Code Online (Sandbox Code Playgroud)
espeak使用包管理器安装,用来自 chromium 浏览器语音调度程序的SpeechSynthesis.getVoices()语音填充数组espeak
$ sudo apt-get install espeak
Run Code Online (Sandbox Code Playgroud)
然后启动带有--enable-speech-dispatcher标志的 Chromium。
在 debian/ubuntu 上构建的 chromium 中默认禁用语音合成。使用--enable-speech-dispatcher命令行标志启用它。
但请注意,如果不安装 Google API 密钥,则不支持语音。
| 归档时间: |
|
| 查看次数: |
7008 次 |
| 最近记录: |