-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hello,
I am using this code for my project but met following error.
Error: cannot call send() while not connected
Error occures in following code snippet:
deepgram.addListener(LiveTranscriptionEvents.Close, async () => {
console.log("deepgram: disconnected");
clearInterval(this.keepAlive);
deepgram.finish(); <-- HERE -->
});
This is log:
throw new Error('cannot call send() while not connected');
^
Error: cannot call send() while not connected
at W3CWebSocket.send (/root/VoiceBot/vonage/node_modules/websocket/lib/W3CWebSocket.js:111:15)
at LiveClient.finish (/root/VoiceBot/vonage/node_modules/@deepgram/sdk/dist/main/packages/LiveClient.js:98:22)
at LiveClient.<anonymous> (/root/VoiceBot/vonage/src/models/mediaStream.js:107:22)
at LiveClient.emit (node:events:514:28)
at LiveClient._socket.onclose (/root/VoiceBot/vonage/node_modules/@deepgram/sdk/dist/main/packages/LiveClient.js:24:18)
at W3CWebSocket._dispatchEvent [as dispatchEvent] (/root/VoiceBot/vonage/node_modules/yaeti/lib/EventTarget.js:107:17)
at W3CWebSocket.onClose (/root/VoiceBot/vonage/node_modules/websocket/lib/W3CWebSocket.js:228:10)
at WebSocketConnection.<anonymous> (/root/VoiceBot/vonage/node_modules/websocket/lib/W3CWebSocket.js:201:17)
at WebSocketConnection.emit (node:events:514:28)
at WebSocketConnection.handleSocketClose (/root/VoiceBot/vonage/node_modules/websocket/lib/WebSocketConnection.js:389:14)
Thank you
fishmeister09 and alexopoulos7
Metadata
Metadata
Assignees
Labels
No labels