Coder Social home page Coder Social logo

mauryaritesh / ai_lyrics Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 5.0 2.81 MB

AI(Artificial Intelligence) can be used to generate Lyrics of songs!

Home Page: https://www.youtube.com/RiteshKumarMaurya

License: Apache License 2.0

Python 100.00%
ai artificial-intelligence python3 lyrics lyrics-generator ai-lyrics-generator riteshkumarmaurya

ai_lyrics's Introduction

AI_Lyrics

Can we use Artificial Intelligence to generate Lyrics?

Of course we can. Isn't that sounds Amazing!!! So, let's get started and discuss this topic in detail in this video.

Computer Requirements Your PC or Laptop must have GPU(Graphics Processing Unit) and the minimum RAM should be 8GB, 16GB or more would be fine. My laptop has 8GBs of RAM and no GPU except a dedicated Intel Graphics Card. That's why it crashed and I had to reboot it on the first run. The Training process would take a lot of time. So, keep patience!

IDEA

The idea is to build a model which is trained on a series of song lyrics and then use it to generate further lyrics with some input. For example, the model will take a small string from the user (Like: Happy Birthday to you) and then it will try to generate the lyrics from this line! For this purpose, I'm using a Keras based RNN, i.e., Recurrent Neural Network with Long Short Term Memory(LSTM) for genrating lyrics which will differ in each case and will also memorize or learns from the past predictions.

Coding the Network

We are using Keras with Tensorflow as backened. Keras lets us to create and solve our problems in an object oriented way. So, there are basically two dependencies for this repo, which can be installed in CMD by typing:

pip install keras
pip install tensorflow

We are done to proceed further! Now just run the following in CMD:

python main.py

This will just print the lyrics with some default sentence in it. If you want to give it your own sentence, then open the main.py program and in the last:

Give your sentence in:
sentence = "Your first line of lyric here"

That's it.

Please do STAR this Repo if you think it helped you.

ai_lyrics's People

Contributors

mauryaritesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ai_lyrics's Issues

Running on CoLab has issue

This is the output:

Diversity: 0.2
Generating with seed: "i will wash away your pain with my tears"
i will wash away your pain with my tearsTraceback (most recent call last):
File "main.py", line 77, in
predictions = model.predict(x, verbose=0)[0]
File "/usr/local/lib/python3.6/dist-packages/keras/engine/training.py", line 1441, in predict
x, _, _ = self._standardize_user_data(x)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/training.py", line 579, in _standardize_user_data
exception_prefix='input')
File "/usr/local/lib/python3.6/dist-packages/keras/engine/training_utils.py", line 145, in standardize_input_data
str(data_shape))
ValueError: Error when checking input: expected lstm_1_input to have shape (40, 40) but got array with shape (40, 236)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.