webkitSpeechRecognition 在 Electron 中返回“网络”错误

问题描述

我使用 Web.Speech.Api 制作了一个用于语音识别的应用程序,它在 Chrome 中运行良好。但是在电子中,我的应用程序发回错误消息“网络”。

如何在电子中使用 Web.Speech.Api? 有人有这方面的经验吗?

电子版: https://i.stack.imgur.com/8cibA.png

代码

import org.apache.spark.ml.linalg.DenseMatrix
import org.apache.spark.ml.feature.VectorAssembler
import org.apache.spark.ml.linalg.Vectors

val data = (1 to 20).map(_.todouble).toArray
val dm = new DenseMatrix(2,10,data)
val vp_df = dm.toArray.toSeq.toDF("number")
val assembler = new VectorAssembler().setInputCols(Array("number")).setoutputCol("features")
val output = assembler.transform(vp_df)
output.select("features").show(false)

错误https://i.stack.imgur.com/BwYjJ.png

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)