Build A Python Web Application That Turns Voice Into Text Into Image - by Andrew
Build A Python Web Application That Turns Voice Into Text Into Image - by Andrew
Save
Introduction
Speech, text, and images are the three ways humanity has transmitted
information
Open in app
throughout history. In this project, we are going toSign
build
up anSign In
You are that
application signedlistens
out. Sign
tointhe
withspeech,
your turns that speech into text, then turns
member account (wi__@g__.com) to
that text into images. All this can be done in the afternoon. We live in a
view other member-only stories. Sign
remarkable
in time!
speech to text to image
Design
This project is broken up into two primary files: main.py and dalle.py.
If the summaries of the files below sound like gibberish to you, hang in there!
Because within the code ,itself, there are many comments which break down these
concepts more thoroughly!
The main script is used for both the streamlit web application and the voice-
to-text API connection. It involves configuring the streamlit session-state,
creating visual features such as buttons and sliders on the web app
interface, setting up a WebSockets server, filling in all the parameters
required for pyaudio , creating asynchronous functions for sending and
receiving the speech data concurrently between our application and the
AssemblyAi’s server.
The dalle.py file is used to connect the streamlit web application to the
Google Colab server running the DALL-E mini engine. This file has a few
functions which serve the following purposes:
main file:
Alas, this project was a fun way to get our hands dirty and play around with
these concepts. It’s sort of disappointing that the DALL-E mini doesn’t have
the same sort of extremely high-quality images that engines like the OpenAI
DALL-E2 have. Nevertheless, I still enjoyed learning the process and
principles behind the technology on this project. Most likely in a few years,
APIs for these high-resolution image-generating services will be easier to
access and play around with anyway. Thanks to anyone who made it all the
way through. And good luck on your journey towards learning every day.
This project was influenced by a YouTube tutorial, so please check that out,
as I found it helpful and they deserve credit.
Artificial Intelligence
Give a tip
A newsletter covering the best programming articles published across Medium Take a look.
By signing up, you will create a Medium account if you don’t already have one. Review
our Privacy Policy for more information about our privacy practices.