Transcribing live stream calls from Twilio in python #311
-
|
Hi team, Love the library — amazing job! I am currently attempting to implement live streaming audio transcription. I would like to implement something similar but with Twilio audio as the source. However, I'm currently running into the issue where TRANSCRIPT_RECEIVED event handler doesn't trigger: https://replit.com/join/tfgzvbjuws-quangtran73 Curious if I'm doing something wrong and whether there are tips to making this work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
|
This is a guide for streaming live Twilio calls to Deepgram in Python: https://deepgram.com/learn/deepgram-twilio-streaming It uses Twilio's streaming API, which will fork Twilio audio to your server, which then processes the audio, sends it to Deepgram via websockets, and gets the live streaming transcription results. Can you share more about what you have tried? My first guess is that, Twilio media messages can't be directly parsed by Deepgram, they are streamed as json text, where the audio payloads are base64-encoded mulaw, so some processing of Twilio's media messages needs to happen before sending the audio to Deepgram (that guide should cover this). |
Beta Was this translation helpful? Give feedback.
This is a guide for streaming live Twilio calls to Deepgram in Python: https://deepgram.com/learn/deepgram-twilio-streaming
It uses Twilio's streaming API, which will fork Twilio audio to your server, which then processes the audio, sends it to Deepgram via websockets, and gets the live streaming transcription results. Can you share more about what you have tried? My first guess is that, Twilio media messages can't be directly parsed by Deepgram, they are streamed as json text, where the audio payloads are base64-encoded mulaw, so some processing of Twilio's media messages needs to happen before sending the audio to Deepgram (that guide should cover this).