Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: cannot call send() while not connected #8

Open
AI-General opened this issue Jan 22, 2024 · 0 comments
Open

Error: cannot call send() while not connected #8

AI-General opened this issue Jan 22, 2024 · 0 comments

Comments

@AI-General
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant