Skip to main content

Lyrics Generation Using LSTM and RNN

  • Conference paper
  • First Online:
Big Data and Cloud Computing (ICBCC 2022)

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 1021))

Included in the following conference series:

  • 246 Accesses

Abstract

For years, both the music and AI industries have been interested in automatic lyric creation. Early rule-based techniques have mostly been supplanted by deep-learning-based systems as computing power and data-driven models have evolved. This paper explores the capability of deep learning models to generate lyrics for a designated musical genre and artist. Previous lyric generation research in the field of computational linguistics has been restricted to Recurrent Neural Networks (RNN) or Gated Recurrent Units (GRU). On the contrary, this paper focuses on the use of LSTM networks to generate lyrics for a certain genre/artist from a sample lyric (seed) as input. The study also looks at how modern deep learning techniques may be used to improve the songwriting process by learning from artists and their significant works. The LSTM model proposed by this paper was able to generate both raps as well as pop lyrics, capturing average line length, in-song, and across-genre word variation very closely to the text it was trained upon. By adjusting the model's parameters, the neural network was pre-trained on the lyrics of different composers and musicians. A multilayer LSTM-based training model with bidirectional neurons and BERT integration is used in this study. To generate a comprehensive set of lyrics, the lyrics supplied as input are divided down into a word and rhyme index. This model is generative; therefore, each trial yielded a unique set of lyrics. The model produces a loss of less than 0.06 when the parameters are set correctly. The differences in the results of permutations of different dropout positions were analyzed. Some of the model's lyrics were determined to be of suitable quality. To summarize, the findings suggest that deep learning techniques can be utilized to support the creative process of songwriting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 229.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 299.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 299.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. History of music. http://en.wikipedia.org/wiki/History_of_music [Accessed: 18th April 2014]

  2. Ali SO, Peynircioglu ZF (2006) Songs and emotions: are lyrics and melodies equal partners? Psychol Music 34(4):511–534. 2006, publisher: SAGE Publications Ltd

    Google Scholar 

  3. Mahedero JP, MartÍnez Á, Cano P, Koppenberger M, Gouyon F (2005) Natural language processing of lyrics. 475–478. https://doi.org/10.1145/1101149.1101255

  4. Settles B (2010) Computational creativity tools for songwriters 49–57

    Google Scholar 

  5. Gervás P (2013) Computational modelling of poetry generation, Corpus ID: 35020911

    Google Scholar 

  6. Logan B, Kositsky A, Moreno P (2004) Semantic analysis of song lyrics 2:827–830. https://doi.org/10.1109/ICME.2004.1394328

  7. Mayer R, Neumayer R, Rauber A (2008) Rhyme and style features for musical genre classification by song lyrics. In: ISMIR 2008 - 9th international conference on music information retrieval 337–342

    Google Scholar 

  8. Nguyen H, Sa B (2009) Rap lyrics generator. https://nlp.stanford.edu/courses/cs224n/2009/fp/5.pdf

  9. Pudaruth S, Amourdon S, Anseline J (2014) Automated generation of song lyrics using CFGs 613–616. https://doi.org/10.1109/IC3.2014.6897243

  10. Santhoopa J (2020) Sequence models and recurrent neural networks (RNNs), Jul 27, 2020. https://towardsdatascience.com/sequence-models-and-recurrent-neural-networks-rnns-62cadeb4f1e1

  11. Laskar MTR (2021). York University utilizing the transformer architecture for question answering. https://doi.org/10.13140/RG.2.2.22446.23364

    Article  Google Scholar 

  12. SuperDataScience Team (2018) Recurrent neural networks (RNN) - the vanishing gradient problem. https://www.superdatascience.com/blogs/recurrent-neural-networks-rnn-the-vanishing-gradient-problem

  13. Gupta TK, Raza K (2019)Chapter 7 - optimization of ANN architecture: a review on nature-inspired techniques. Dey N, Borra S, Ashour AS, Shi F (eds) Machine learning in bio-signal analysis and diagnostic imaging. Academic, pp 159–182, ISBN 9780128160862. https://doi.org/10.1016/B978-0-12-816086-2.00007-2

  14. DiPietro R, Hager GD (2020) Chapter 21 - Deep learning: RNNs and LSTM. In: Kevin Zhou S, Rueckert D, Fichtinger G (eds) The Elsevier and MICCAI society book series, handbook of medical image computing and computer assisted intervention. Academic, pp 503–519. ISBN 9780128161760. https://doi.org/10.1016/B978-0-12-816176-0.00026-0

  15. Nicholson C (2020) A beginner's guide to LSTMs and recurrent neural networks. https://wiki.pathmind.com/lstm

  16. Singh J (2020) Activation function breakthrough. inblog.in/ACTIVATION-FUNCTION-BREAKTHROUGH-VOyvxhTELU

    Google Scholar 

  17. Ramasamy L, Kaliappan J, Prem V, Nonghuloo M (2020) Analyses and modeling of deep learning neural networks for sequence-to-sequence translation. Int J Adv Sci Technol 3152–3159

    Google Scholar 

  18. Phi M (2018) Illustrated guide to LSTM’s and GRU’s: a step-by-step explanation, Sep 24, 2018. https://towardsdatascience.com/illustrated-guide-to-lstms-and-gru-s-a-step-by-step-explanation-44e9eb85bf21

  19. Shah D (2021) Song lyrics dataset, version 5. Retrieved October 12, 2021, from https://www.kaggle.com/deepshah16/song-lyrics-dataset

  20. Brownlee J (2018) A gentle introduction to dropout for regularizing deep neural networks, December 3, 2018. https://machinelearningmastery.com/dropout-for-regularizing-deep-neural-networks/

  21. Horev R (2018) BERT explained: state of the art language model for NLP, Nov 10, 2018. https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270

  22. Aggarwal R (2019) Bi LSTM, Jul 4, 2019. https://medium.com/@raghavaggarwal0089/bi-lstm-bc3d68da8bd0

    Google Scholar 

  23. Hoel E (2021) The overfitted brain: dreams evolved to assist generalization. Patterns 2(5):100244, ISSN 2666–3899. https://doi.org/10.1016/j.patter.2021.100244

  24. Yu Y, Srivastava A, Canales S (2021) Conditional LSTM-GAN for melody generation from lyrics. ACM Trans Multimedia Comput Commun 1, Article 35 (February 2021):20. https://doi.org/10.1145/3424116

  25. Briot J-P, Pachet F (2017) Music generation by deep learning—Challenges and directions. Accessed from http://arxiv.org/abs/1712.04371

  26. Potash P, Romanov A, Rumshisky A (2015) GhostWriter: using an LSTM for automatic rap lyric generation 1919–1924. https://doi.org/10.18653/v1/D15-1221

  27. Enrique A (2018) Word-level LSTM text generator. Creating automatic song lyrics with neural networks, June 2018. https://medium.com/coinmonks/word-level-lstm-text-generator-creating-automatic-song-lyrics-with-neural-networks-b8a1617104fb. Accessed 27 Feb 2019

  28. Tong Y, Liu YuLing, Wang J, Xin G (2019) Text steganography on RNN-generated lyrics. Math Biosci Eng 16(5):5451–5463. https://doi.org/10.3934/mbe.2019271

    Article  MathSciNet  MATH  Google Scholar 

  29. Aarthi D, Viswanathan V, Nandhini B, Ilakiyaselvan N (2019) Question classification using a rule based model. Int J Innov Technol Explor Eng 9(1)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to N. Ilakiyaselvan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dhandapani, A., Ilakiyaselvan, N., Mandal, S., Bhadra, S., Viswanathan, V. (2023). Lyrics Generation Using LSTM and RNN. In: Venkataraman, N., Wang, L., Fernando, X., Zobaa, A.F. (eds) Big Data and Cloud Computing. ICBCC 2022. Lecture Notes in Electrical Engineering, vol 1021. Springer, Singapore. https://doi.org/10.1007/978-981-99-1051-9_24

Download citation

Publish with us

Policies and ethics