javascript - sox 在节点 js 中以错误代码 1 退出
问题描述
我想使用 Google Cloud Speech to text 进行实时流式传输
我正在 Google Cloud Speech to text document 上运行一些示例代码,
但出现此错误
sox has exited with error code 1.
Enable debugging with the environment variable DEBUG=record.
我尝试过的事情
安装 sox (14.4-1, 14-4-2) => 后设置 Sox 环境变量不起作用
更改
recordProgram
记录选项的值(recordProgram: 'rec' => 'sox')但它不起作用。我找到了一个将 , 添加到 in 但我无法应用它的解决方案,
-t
因为raw
现在cmdArgs
代码node_modules/node-record-lpcm16/index.js
不同了。使用 node-microphone 库但未被识别
操作系统:window10
language: node js
dependencies: {
"@google-cloud/speech": "^4.1.5",
"express": "^4.17.1",
"node-microphone": "^0.1.5",
"node-record-lpcm16": "^1.0.1"
}
Codesandbox:简单的源代码
解决方案
你在窗户上工作吗?
尝试从以下位置安装 sox:
choco install sox.portable
推荐阅读
- javascript - 配置 Vue 加载器和惰性大小以使用 Nuxt 转换 url
- docker - 如何为 flink docker 容器配置一些外部 jars 库
- python - 将子文件夹中的文件复制到其他目录的同名子文件夹中
- sql - 如何将json属性从一个记录值移动到SQL中的一个新值
- php - 我疯了,还是 PHP 的 strototime() 坏了?
- r - 为什么 geom_box 绘图栏不会以正确的顺序出现在小数字中
- swift - 仅堆叠具有相同位置的标记
- python - python嵌套dict获取具有最大键的dict对象
- python - 如何在嵌入 discord.py 中使用 markdown 语法发送图像
- android - 如何将 android.graphics.Color 转换为 androidx.compose.ui.graphics.Color