Hi everyone,
I’m excited to share with you my latest project: a Streamlit app that lets you play with Deepgram’s Speech-to-Text API
Deepgram is a state-of-the-art STT platform that can transcribe audio into text with high accuracy and speed. However, I found their official API playground a bit limited in some features, so I decided to create my own version with some enhancements
With my app, you can:
-
Save your API results in cache and avoid unnecessary costs
-
Choose between recorded or streaming audio input
-
Use different audio sources, such as microphone, audio URLs, or YouTube links
-
Explore additional Deepgram API features that are not available in their playground
You can check out my app here: https://deepgram-playground.streamlit.app/
And the source code here: GitHub - SiddhantSadangi/st_deepgram_playground: API playground for Deepgram built with Streamlit
I would love to hear your feedback and suggestions on how to improve it
If you like my app and find it useful, please consider giving it a star on GitHub It would mean a lot to me and motivate me to keep improving it
P.S.: There is a hidden surprise in the app. Can you find it?
2 Likes
Hey Siddhant nice app, however can’t see the microphone as an option to provide the audio to the app.
Hey @Ibrahim_Khan ,
The microphone option will be visible once you’ve entered the Deepgram API key on the left, and have the “Prerecorded” format selected
Please let me know if you still cannot see it.
1 Like
Hey Siddhant thanks for the prompt reply, yes I was able to get the microphone option in the pre-recorded section.
What if I wish to have a real time streaming audio based transcription? I can see that in the deepgram playground we have this option but can’t find any relevant code for that.
The streaming code is a bit more complicated to preview in the app.
However, you can see how it is implemented in the source here: st_deepgram_playground/app.py at main · SiddhantSadangi/st_deepgram_playground (github.com)
You can also refer to Deepgram’s docs: Streaming Speech-to-text Quickstart (deepgram.com)
Okay sure, will check this out, thanks
1 Like
Hey Siddhant nice app but
i am facing this error after passing my api key. I have clone your repo and now running on my local
Hey @hrithik , can you confirm if you have deepgram-sdk<3.0
installed in your local environment?
i have # Install the Deepgram Python SDK
pip install deepgram-sdk==3.*
@hrithik - the app currently supports only deepgram-sdk<3.0
.
I’d recommend downgrading your version of Deepgram using pip install deepgram-sdk<3.0
.
Also, as a general recommendation, whenever you clone a repo and try to run it locally, it is better to install the packages from the repo’s requirements.txt
:
pip install -r requirements.txt
but i have created my whole project with deepgram sdk 3 version, what if i face any issue?
You will face issues, unfortunately.
Deepgram SDK v3 introduces a LOT of breaking changes. I’ll be updating my app to support v3, but it’ll take a few weeks atleast.
i have worked with v3 and it’s working fine in my local machine i have worked for real time speech to text from microphone i just want to created it’s streamlit UI where i want a button of start recording stop recording and want the transcribed on my UI and want to save the transcribed text in a variable
You’ll have to create a Streamlit app from scratch then. You can use mine as a template for the UI, but will need to update the transcription methods to use deepgram v3
what changes can i do in your code to make it ready for my requirements
Is there any method to play the audio automatically on streamlit UI without clicking the play button, if i am getting an audio output from TTS model
Is there any method to play the audio automatically on streamlit UI without clicking the play button
Not that I know of. I use st.audio
to render audio, and it doesn’t provide any autoplay option.
Also, I am almost done updating the app to support deepgram-sdk v3.0. I should be able to release it this week after some debugging and testing of the streaming audio features.
how can i play audio autoplay in strealit UI by any function (HTML or anythin) if any one is able to do it please share?