Inspiration

Rap is the acronym for Rhythm And Poetry. We already know that Rap is urban poetry with music but, which is it´s digital equivalent? We think the answer is Twitter.

Rap verses are usually short but very powerful, just like tweets. Both are used for driving attention around delicate or problematic subject but also to express feelings or make laugh… anyway, no matter the subject, the goal is always the same: sharpen one´s wits in order to say so much with so little.

## What it does

#TrendingGallos is an app that recreates the epic “Batalla de los Gallos” (Battle of the Roosters -freestyle rap battles-) with Twitter conversations.

It´s starts with a word you introduce, once you´ve registered and logged in with your Twitter acount. Then, when you click on the “Look for a fight” button, the app will suggest and show real tweets related with your word, as a rhymed answer to it.

If you repeat it several times, you´ll generate your own “Batalla de Gallos” in the form of a Twitter thread, with the app as an opponent. You could save your battles and play their audios anytime you want.

How we built it

The project consists in two applications; an android mobile app and a nodeJS backend application. The mobile app logs into Twitter to get its authentication and access the needed tweets. Once the user writes a word to rhyme, the app asks for rhymes to the application server. After that, it retrieves several tweets related with some of the rhyme words. We can create a chunk of tweets that rhyme by selecting them and saving into the mobile internal memory.

Starting from that basis of cool tweets related to the rhymed content, we can dig into the next step: generating a rap-like related response automatically. Using all the tweets found, the platform get the key words of them and then selects the most relevant. Those keywords will be used to generate the rap-like response.

We have modelled 8 different rap retorical figure patterns inside the platform. Using those patterns, we generate some small pieces of text that are related to the original topic and also rhymes using a cool way. The system automatically generate and select the most suitable words, verbs and adjectives to fit with the main topics of the sentence.

The backend is developed in nodejs and integrates few vocabulary third parties API's. The platform has been deployed to an aruba IT infraestructure in Chech Republic.

Challenges we ran into

Coordinating several API was not easy (android asynchronous tasks are always a problem) and configuring Twitter authentication troubled a little at the beginning. The same for the backend, using a lot of nested API calls in order to find the right vocabulary, mess into a lot of programming stuff to manage Promises properly in a fast way.

Accomplishments that we're proud of

After a 36 hours hack, we've built something that works and it's funny to see it working. Just give it a try.

What we learned

We dig into android fundamentals like activities life-cycle, adapters and asynchronous task). Also, we have learned a lot in all stuff related to asynchronous calls and their well-made management.

What's next for #TrendingGallos

We had planned to integrate some extra API's in order to fit the audio to the base song and also to modify the singing pitch for certain emphasis words.

Built With

Share this project:
×

Updates