Getting input from user's microphone and send the data to Deepgram #171
-
Hi, I am learning web development and I want to build an application that users can speak with their microphones the client side will send this audio data to the server side and the server side will use Deepgram API to transcribe. What's the best way to achieve this functionality? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hey @weilirs! Check out this blog post to get started: https://blog.deepgram.com/how-to-transcribe-only-what-you-need-with-python-listening-before-connected/ The code is written in Python and it hooks up to your computer's microphone, listens to the audio, streams the audio to deepgram, and gets the transcription back. This is the best way to achieve what you're looking for quickly. Let me know if you'd like more info or would like to go in another direction, happy to keep talking about what you're building. |
Beta Was this translation helpful? Give feedback.
Yeah I can try to help figure out what's going on. I've created a local React app and copy-pasted your code into it. It compiles and it looks good by eye, and I can run it as the frontend.
For the backend/server, can you please send me a .zip file with the code and some instructions on how to boot it up?
For example, it would be helpful to have the code that hosts the
/transcribe
API endpoint that is called in the React app viaconst response = await fetch('http://localhost:8000/api/transcribe', { ...
. I see the definition of that endpoint - and everything looks good by eye - but I can't run it without additional code.