What it does

TextToObamaSpeech can give users customized Obama speeches. A user can enter a string of words that they would like to hear Obama say and we will return a video of stitched together clips of Obama saying each word.

How we built it

This project is built on top of AWS to leverage their immense compute power and uses ReactJS for the front-end and Spring Boot/Web/MVC for the back-end server. In Spring, we defined our own RESTful API to request the videos based the text entered.

For building the videos, we have a large repository of repository of Obama's speeches and use a utility called FFMpeg for all of our video manipulations. As a prerequisite for the set-up for our server, we have several jobs that when kicked off, use IBM's BlueMix APIs to identify words from videos which we then use to build a giant map of each word said in all of the speeches, along with the time stamps of when those words were said. Then, we a user makes a request for a particular string of words, we can use that map to reference the videos and start splicing together clips for the user.

Challenges we ran into

The biggest challenge we ran into was speed. Videos are generally large things and when you have a lot of them and have to search through them for words, grab specific clips from them, and then splice all of those clips together into one continuous video, it takes some time. A lot of time. That's where PipeDream comes in. PipeDream is our own custom MapReduce pipeline. Based on the historic MapReduce 2004 Paper by Jeff Dean, by leveraging AWS compute power, PipeDream allows us to execute huge amounts of video processing in parallel and cutting our run-time into a mere fraction of what it would be.

Accomplishments that we're proud of

In addition to PipeDream, we also created a smart caching solution we call Fa$tCache so that if a word or phrase has already been asked, building the video the second time around will go much faster.

What we learned

We learned that Video processing is hard, but rewarding. Also, Obama apparently has some interesting opinions (at least according to our videos).

What's next for TextToObamaSpeech

The next steps would to be add other people to our video repository. We choose Obama because he has a lot of publicly available speeches to draw from, but our project can take videos of any person, as long as there is enough recorded audio of them to build speeches out of. Who know's what politician/celebrity we'll try next, but feel free to give us some recommendations!

Built With

Share this project:

Updates