使用voiceBase Api的文本

我正尝试在nexmo中使用语音库将语音转换为文本。 我在WebSocket客户端遇到了这个问题。 我的回应错误是:

info: Server listening on:8900
info: A client is connected!
events.js:183
throw  er; // Unhandled 'error' event
Error: This socket is closed
at Socket._writeGeneric (net.js:726:18)
at Socket._write (net.js:786:8)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at Socket.Writable.write (_stream_writable.js:290:11)
at Socket.write (net.js:704:40)
at WebSocketRequest.accept (/home/apptivo/Music/nexmoVoicebaseSample/Nexmo-RTS-Voicebase-master/WS-node/node_modules/websocket/lib/WebSocketRequest.js:450:21)
at WebSocketServer.handleUpgrade (/home/apptivo/Music/nexmoVoicebaseSample/Nexmo-RTS-Voicebase-master/WS-node/node_modules/websocket/lib/WebSocketServer.js:216:19)
at emitThree (events.js:141:20)
at Server.emit (events.js:217:7)

如何解决这个问题?


我之前遇到过这个问题(我是这个项目的开发者)。 确保你的api密钥是正确的,并在WS-Node文件夹内的.env文件中设置。 它应该设置为

ASR_URL={VOICEBASE_URL}
ASR_CLIENT_KEY={VOICEBASE_CLIENT_KEY}
ASR_CLIENT_SECRET={VOICEBASE_CLIENT_SECRET}
链接地址: http://www.djcxy.com/p/5665.html

上一篇: text using voiceBase Api

下一篇: 404 error in all Nexmo API calls