deepgram-js-sdk icon indicating copy to clipboard operation
deepgram-js-sdk copied to clipboard

getFunction for _socket WebSocket in LiveClient for live transcription with twilio

Open Rajan-Gupta1 opened this issue 1 year ago • 2 comments

Proposed changes

Provide a get method getW3CWebSocket() to return the URI

Context

To be able to live transcription from a Twilio Live Stream, Twiml <Response> <Start> <Stream url="wss://<to DeepGram, returned by getW3CWebSocket()"/> </Start> </Response> This should avoid setting up a webproxy server as described here https://deepgram.com/learn/deepgram-twilio-streaming for simple cases where one needs to get the transcription, show it to user and then be able to send the complete transcription to OpenAI for summarization

Possible Implementation

public getW3CSocket() { return this._socket }

Other information

Rajan-Gupta1 avatar May 14 '24 14:05 Rajan-Gupta1

Check out draft PR #283 which makes the socket connection public. That Twilio blog also predates a ton of improvements we've made

lukeocodes avatar May 14 '24 14:05 lukeocodes

Awesome Thank You.

Rajan-Gupta1 avatar May 14 '24 16:05 Rajan-Gupta1

this will be available in the conn property of the client

lukeocodes avatar Jul 02 '24 10:07 lukeocodes