Inspiration

An interest in NLP started our path toward this project. The idea of singing a sentence in the format of a song, like instead of singing "She's an easy lover," when talking about taking your dog for a walk, you might sing "She's an easy walker," and we thought it would be fun to create a program that would find songs for you to sing your ideas to.

What it does

The program takes in a user-written lyric or sentence and counts the number of syllables in the given lyric/sentence. It finds lyrics from real songs that match the number of syllables, and informs the user of the matching lyrics and the songs they're from.

How I built it

Our team scraped song titles and lyrics from AZLyrics.com and saves them to a file. The program learns the syllable count of each lyric from our songs in the file. It determines the syllable count with syllapy and keeps lists for each syllable count of lyrics and titles. Once the user inputs a line, the program randomly selects 3 lines with the correct syllable count list and offers them and their song titles to the user as matches.

Challenges I ran into

Scraping the songs requires a great deal of time; it requires a pause of a random length between each song, which made gathering data time consuming and difficult to troubleshoot. The song lyrics often contained words that had no real syllable counts (such as the "oooooooo"s in Bohemian Rhapsody). This makes syllable counting somewhat inconsistent or meaningless for those particular lines.

What I learned

We learned about different tools for developers to scrape song lyrics and data. We also explored different syllable counting programs.

What's next for Song Lyric Syllable Matcher

We would like to add more songs, as we were only able to get a small number for testing in time. In the future, we'd also like to implement a more complex feature, in which the user can give a topic and the program will create a new song with the same rhythm as known one on the topic. This is a larger project which requires significantly more NLP.

Built With

  • beautifulsoup4
  • colab
  • python
  • syllapy
Share this project:

Updates