【问题标题】:Google Cloud Speech to Text NodeJs that from google official document does not work on Google Compute Engine Linux Server来自 google 官方文档的 Google Cloud Speech to Text NodeJs 在 Google Compute Engine Linux Server 上不起作用
【发布时间】:2021-05-01 22:50:58
【问题描述】:

我想使用带有 Nodejs 的谷歌云语音 API 开发流输入应用程序的语音到文本转换。 所以我使用 Google 示例源并在我的 Window PC 中安装了 SOX(版本 14.4.1)记录器,并且在本地运行 Nodejs 应用程序运行良好。 但是当我使用 Linux 服务器在 Google Compute Engine 上上传我的 Nodejs 应用程序时,SOX 的音频设备无法正常工作。 错误是【FAIL sox: missing filename】。 如何从客户端接收音频? 有没有办法解决Linux中的上述错误? app.js

error

【问题讨论】:

  • SOX 未安装在遥控器上。弄清楚如何安装它或找到不使用 SOX 的识别器替代实现

标签: node.js google-cloud-platform google-speech-api sox google-speech-to-text-api


【解决方案1】:

GCE Linux VM 似乎不支持声卡。

要对此进行测试,假设您正在运行基于 APT 的发行版(Debian 或 Ubuntu),请使用 sudo apt-get install alsa-utils 安装 alsa-utils,然后运行 ​​sudo aplay -l

第二个命令列出所有声卡和数字音频设备。它应该给你这样的结果:

aplay: device_list:270: no soundcards found...

这意味着即使您在 Linux GCE VM 中安装了 SoX,您也无法使用流输入应用程序的语音到文本转换(例如 thisthis)。

【讨论】:

    猜你喜欢
    • 2019-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-21
    相关资源
    最近更新 更多