deepgram-previews / real-time-voice-bot

MIT License
20 stars 13 forks source link

Getting error after starting server #3

Open gauravkesharwani opened 8 months ago

gauravkesharwani commented 8 months ago

Hello, I cloned the repo and followed all steps, verified all the api key are correct. getting below error on index page->

[nodemon] 2.0.7 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node server.js Starting Server on Port 3000 Running Connected on server side with ID: JGOpkbxwU6WH4nk8AAAB ERROR MESG n { target: T { _events: [Object: null prototype] { open: [Function], close: [Function], error: [Function], message: [Function] }, _eventsCount: 4, _maxListeners: undefined, _binaryType: 'nodebuffer', _closeCode: 1006, _closeFrameReceived: false, _closeFrameSent: false, _closeMessage: '', _closeTimer: null, _extensions: {}, _protocol: '', _readyState: 2, _receiver: null, _sender: null, _socket: null, _bufferedAmount: 0, _isServer: false, _redirects: 0, _url: 'wss://api.deepgram.com/v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000', _req: ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [TLSSocket], _header: 'GET /v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000 HTTP/1.1\r\n' + 'Sec-WebSocket-Version: 13\r\n' + 'Sec-WebSocket-Key: mS0RAqkFk7Eqh5QiQ0cBJg==\r\n' + 'Connection: Upgrade\r\n' + 'Upgrade: websocket\r\n' + 'Authorization: token 6b4337df6f394f47ac8916021fc206a5\r\n' + 'User-Agent: @deepgram/sdk/1.21.0 node/20.11.1\r\n' + 'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' + 'Host: api.deepgram.com\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: undefined, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000', _ended: false, res: [IncomingMessage], aborted: true, timeoutCb: null, upgradeOrConnect: false, parser: [HTTPParser], maxHeadersCount: null, reusedSocket: false, host: 'api.deepgram.com', protocol: 'https:',

  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null,
  [Symbol(kError)]: undefined
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false

}, type: 'error', message: 'Unexpected server response: 401', error: Error: Unexpected server response: 401 at ClientRequest. (C:\Users\gaura\gihub_repo\real-time-voice-bot\node_modules\@deepgram\sdk\dist\index.js:1:54417) at ClientRequest.emit (node:events:518:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at TLSSocket.socketOnData (node:_http_client:535:22) at TLSSocket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) } dgLive socketId: JGOpkbxwU6WH4nk8AAAB ERROR::Type:error / Code:undefined dgLive socketId: JGOpkbxwU6WH4nk8AAAB CONNECTION CLOSED!

moskanoro commented 3 months ago

Hello, I cloned the repo and followed all steps, verified all the api key are correct. getting below error on index page->

[nodemon] 2.0.7 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node server.js Starting Server on Port 3000 Running Connected on server side with ID: JGOpkbxwU6WH4nk8AAAB ERROR MESG n { target: T { _events: [Object: null prototype] { open: [Function], close: [Function], error: [Function], message: [Function] }, _eventsCount: 4, _maxListeners: undefined, _binaryType: 'nodebuffer', _closeCode: 1006, _closeFrameReceived: false, _closeFrameSent: false, _closeMessage: '', _closeTimer: null, _extensions: {}, _protocol: '', _readyState: 2, _receiver: null, _sender: null, _socket: null, _bufferedAmount: 0, _isServer: false, _redirects: 0, _url: 'wss://api.deepgram.com/v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000', _req: ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [TLSSocket], _header: 'GET /v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000 HTTP/1.1\r\n' + 'Sec-WebSocket-Version: 13\r\n' + 'Sec-WebSocket-Key: mS0RAqkFk7Eqh5QiQ0cBJg==\r\n' + 'Connection: Upgrade\r\n' + 'Upgrade: websocket\r\n' + 'Authorization: token 6b4337df6f394f47ac8916021fc206a5\r\n' + 'User-Agent: @deepgram/sdk/1.21.0 node/20.11.1\r\n' + 'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' + 'Host: api.deepgram.com\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: undefined, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/v1/listen?language=en-US&smart_format=true&model=nova&interim_results=true&endpointing=100&no_delay=true&utterance_end_ms=1000', _ended: false, res: [IncomingMessage], aborted: true, timeoutCb: null, upgradeOrConnect: false, parser: [HTTPParser], maxHeadersCount: null, reusedSocket: false, host: 'api.deepgram.com', protocol: 'https:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null, [Symbol(kError)]: undefined }, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, type: 'error', message: 'Unexpected server response: 401', error: Error: Unexpected server response: 401 at ClientRequest. (C:\Users\gaura\gihub_repo\real-time-voice-bot\node_modules@deepgram\sdk\dist\index.js:1:54417) at ClientRequest.emit (node:events:518:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at TLSSocket.socketOnData (node:_http_client:535:22) at TLSSocket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) } dgLive socketId: JGOpkbxwU6WH4nk8AAAB ERROR::Type:error / Code:undefined dgLive socketId: JGOpkbxwU6WH4nk8AAAB CONNECTION CLOSED!

did you find solution ?

DamienDeepgram commented 3 months ago

401 usually means your API Key is invalid