@michaeljolley
I'm trying to send real-time audio to deebgram and get the transcription but I get this error while doing so.
I'm using pyaudio to send the binary data.
Hi @sandy_codes_py ! Happy Monday! I'm sorry to hear you were having some trouble. Were you able to figure out the issue? Please let me know if you still need some help and we can work through it together.
Nope, I followed your Flask repo and did that same. But I really want to run that in just Python and not on Flask. I do have limited knowledge on asyncio. Will be learning that soon. I've shared the error and the complete code I'm using the same thread.
Sorry to misled you!
Actually I wanted to directly send the audio feed using PyAudio to the Deepgram websocket (that's when the above error is occurring).
But I found your Flask tutorial and used that instead which worked in the first go.
Oh nice! Good to hear you found a solution with the tutorial 😄.
About asyncio, yea, I totally understand it can be very confusing. It took me awhile to wrap my head around it. How do you plan on learning asyncio? Tutorials? Blog posts? Videos? Something else?
Gonna read through this for a while and try some hands-on stuff. docs.python.org/3/library/asyncio....
I'll try to make a tutorial here once I get a good grasp.
Hi @sandy_codes_py, I'm not a Python pro, but I can hook you up with @tonyasims. She's an amazing pythonista and one of Deepgram's Developer Advocates.
One thing that might help, is there a GitHub repo where we can review the full block of code?
That would do!
I did find a workaround it by using her post "Live Transcription With Python and Flask" but that's not really needed here.
I just want to run it locally to do something cool.
Yay, even I've to learn about async and how it works.
@michaeljolley
I'm trying to send real-time audio to deebgram and get the transcription but I get this error while doing so.
I'm using pyaudio to send the binary data.
input_audio = stream_in.read(3200)
await ws.send(input_audio)
DEBUG:websockets.client:< CLOSE 1008 (policy violation) DATA-0000 [11 bytes]
Hi @sandy_codes_py ! Happy Monday! I'm sorry to hear you were having some trouble. Were you able to figure out the issue? Please let me know if you still need some help and we can work through it together.
Nope, I followed your Flask repo and did that same. But I really want to run that in just Python and not on Flask. I do have limited knowledge on asyncio. Will be learning that soon. I've shared the error and the complete code I'm using the same thread.
Ok, so if I understand correctly you follwed the Flask example in the tutorial but still having some issues? Is the issue still with PyAudio?
Also, is this the error message you received? (I want to make sure this is the correct error):
input_audio = stream_in.read(3200)
await ws.send(input_audio)
DEBUG:websockets.client:< CLOSE 1008 (policy violation) DATA-0000 [11 bytes]
Sorry to misled you!
Actually I wanted to directly send the audio feed using PyAudio to the Deepgram websocket (that's when the above error is occurring).
But I found your Flask tutorial and used that instead which worked in the first go.
The complete code I used can be found here.
Oh nice! Good to hear you found a solution with the tutorial 😄.
About asyncio, yea, I totally understand it can be very confusing. It took me awhile to wrap my head around it. How do you plan on learning asyncio? Tutorials? Blog posts? Videos? Something else?
Gonna read through this for a while and try some hands-on stuff.
docs.python.org/3/library/asyncio....
I'll try to make a tutorial here once I get a good grasp.
Wonderful! Make sure to let me know when it's published so I can read it :)
You got it!
Hi @sandy_codes_py, I'm not a Python pro, but I can hook you up with @tonyasims. She's an amazing pythonista and one of Deepgram's Developer Advocates.
One thing that might help, is there a GitHub repo where we can review the full block of code?
Please check here
I've used api reference code from the deepgram docs
Sweet. Thanks for that. Tonya is out of the office today, but she'll likely respond Monday.
Mental note: I should really start playing with Python more so I can help more. 🙂
That would do!
I did find a workaround it by using her post "Live Transcription With Python and Flask" but that's not really needed here.
I just want to run it locally to do something cool.
Yay, even I've to learn about async and how it works.
Great! I think she wrote several posts like that: "using Flask," "using Django," "using FastAPI," and more.
And yeah! for learning! 🎉🎉