Iβm a NYC serial entrepreneur who recently fell in love with dev. Passionate about all things Python, AI, data science and machine learning. Praying for πΊπ¦
Having a little bit of a hard time figuring out the final part of the listen endpoint.
1) In a local environment, how would I go about sending the empty binary message to the server?
2) Upon ending, where is the final transcript JSON now?
Iβm a NYC serial entrepreneur who recently fell in love with dev. Passionate about all things Python, AI, data science and machine learning. Praying for πΊπ¦
Having a little bit of a hard time figuring out the final part of the
listen
endpoint.1) In a local environment, how would I go about sending the empty binary message to the server?
2) Upon ending, where is the final transcript JSON now?
Thank you.
Great question. It depends on how you're hitting the API. If you are using the Node SDK you'd use the
finish
function, as in:If you're communicating with the WebSocket directly with JavaScript you can send a new Uint8Array, as in:
When the Deepgram API receives that it will finish transcribing the audio, send a final transcript, and then close the WebSocket connection.
Appreciate the response.
What about good old Python please?
P.S. Great Twitch btw, really enjoyed it.
Thanks!
For the Python SDK:
Against the WebSocket without the SDK would be something like:
Thanks for coming to the stream today!