【问题标题】:sox has exited with error code 1 in node jssox 在节点 js 中以错误代码 1 退出
【发布时间】:2020-12-16 15:09:12
【问题描述】:

我想要使用 Google Cloud Speech to text 实时流式传输
我在 Google Cloud 语音转文本文档中运行一些示例代码
但是会出现这个错误

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')但它不起作用。

  • 我找到了一个解决方案,可以在node_modules/node-record-lpcm16/index.js 中将-traw 添加到cmdArgs,但我无法应用它,因为现在代码不同了。

  • 使用节点麦克风库但未被识别

操作系统: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"  
  }  

代码沙盒:simple source code

【问题讨论】:

  • 您是否这样做:“使用环境变量 DEBUG=record. 启用调试”?结果如何?
  • 重启电脑就可以了 谢谢你的回答:)

标签: javascript node.js sox


【解决方案1】:

你在 Windows 上工作吗?

尝试从以下位置安装 sox:

choco install sox.portable

【讨论】:

    猜你喜欢
    • 2017-11-14
    • 1970-01-01
    • 2014-08-08
    • 1970-01-01
    • 2012-10-18
    • 2020-06-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多