Inspiration
We were inspired to do this project when we were exposed to the AssemblyAI part of the project that we could use. AssemblyAI provides a way to convert text to speech, and so our minds focused on making something based around that. Additionally, web-scraping was something in mind that we intended to focus on, due to a fascination in the topic, and the desire to improve our skills in that area. Our minds then went to various ideas surrounding taking in speech as a user input, thinking about possible applications to chess, songs, discord calls; eventually being inspired by Shazam, but instead of song lyrics, we deal with movie quotes.
What it does
We have a website takes in an audio file of our input, and it converts it into plain text using a transcriber. Then it passes in the plain text equivalent into a function which then web-scrapes the top 5 movies that contain that quote, outputting the result to the website.
How we built it
This was built by splitting up into 3 main parts:
- Designing the front end and the interface of the website; this involved making the website look nice, taking in an audio file, and outputting the final list of results. This made use of the flask library.
- Creating the transcriber, in which it takes in an audio file, and converts it into usable plain text as a string. This was done by making use of the AssemblyAI tool provided for the hackathon.
- Making the web-scraper, which takes the plain text form of the quote, and searches for it on the quoDB website, finding the top movies that include that quote. This makes use of BeautifulSoup4, Selenium and Chrome Drivers
The final program is then combining all of these elements into one, and making it output the correct result to the website.
Challenges we ran into
The challenges that we ran into was an inability to access the real time audio features of AssemblyAI and from the website. This was problematic as it meant that instead of taking a live recording of audio like we wanted, we instead had to make it so that it would take a pre-recorded audio file on the user's device, which is less than ideal.
Another challenge was trying to optimize the program as it isn't particularly fast, as AssemblyAI has to take a request, then it gives us a website to pull from, and then we have to take the text from it, making it a rather slow and inefficient process. Similarly the web-scraping could be made faster as well, as it takes time to isolate the elements that we want.
Accomplishments that we're proud of
We are proud that we managed to create a working program in the end. For this being our fist hackathon, all of us not experienced in another the libraries and APIs that we were working with, we are proud that we created a fully functioning program that gives the output that we wanted. The excitement when we put in an audio file of us saying "I am your father", and it actually spitting out "Star Wars: Episode V".
What we learned
We learned important skills in using the APIs that we were newly exposed too. The key areas that we developed our skills in were: web-scraping, using APIs, using the AssemblyAI, using flask, and improving web design skills.
What's next for What's that movie
The biggest change that we would like to make is to take audio in real time, and to not require a pre-made audio file. This could definitely be done with enough time and more understanding of the web design and AssemblyAI. Another improvement would be to optimize the speed, but this is limited by the APIs that we are using. Finally I would add in a feature that says who says that quote from the film, but this would require even more web-scraping else where.
Built With
- assemblyai
- beautiful-soup
- flask
- python
- selenium
Log in or sign up for Devpost to join the conversation.