我正在尝试制作一个可以自动阅读文本的网络应用程序,我有这段代码:function hablalo() { var palabra = new SpeechSynthesisUtterance('Casilla 6 turno E18'); palabra.lang = "es" speechSynthesis.speak(palabra); } $('#perez').trigger($.Event( "click", { originalEvent: true } ));所以我有一个调用 hablalo 事件的按钮。问题是当我尝试这样做时,结果是:(index):20 [Deprecation] speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details我想要一种模拟 chrome 中点击的方法或另一种制作 tts 的方法,谢谢。:)--编辑如果您知道我可以在加载网页时用于自动播放 tts 的库,那很好
添加回答
举报
0/150
提交
取消