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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
History of music. http://en.wikipedia.org/wiki/History_of_music [Accessed: 18th April 2014]
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
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
Settles B (2010) Computational creativity tools for songwriters 49–57
Gervás P (2013) Computational modelling of poetry generation, Corpus ID: 35020911
Logan B, Kositsky A, Moreno P (2004) Semantic analysis of song lyrics 2:827–830. https://doi.org/10.1109/ICME.2004.1394328
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
Nguyen H, Sa B (2009) Rap lyrics generator. https://nlp.stanford.edu/courses/cs224n/2009/fp/5.pdf
Pudaruth S, Amourdon S, Anseline J (2014) Automated generation of song lyrics using CFGs 613–616. https://doi.org/10.1109/IC3.2014.6897243
Santhoopa J (2020) Sequence models and recurrent neural networks (RNNs), Jul 27, 2020. https://towardsdatascience.com/sequence-models-and-recurrent-neural-networks-rnns-62cadeb4f1e1
Laskar MTR (2021). York University utilizing the transformer architecture for question answering. https://doi.org/10.13140/RG.2.2.22446.23364
SuperDataScience Team (2018) Recurrent neural networks (RNN) - the vanishing gradient problem. https://www.superdatascience.com/blogs/recurrent-neural-networks-rnn-the-vanishing-gradient-problem
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
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
Nicholson C (2020) A beginner's guide to LSTMs and recurrent neural networks. https://wiki.pathmind.com/lstm
Singh J (2020) Activation function breakthrough. inblog.in/ACTIVATION-FUNCTION-BREAKTHROUGH-VOyvxhTELU
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
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
Shah D (2021) Song lyrics dataset, version 5. Retrieved October 12, 2021, from https://www.kaggle.com/deepshah16/song-lyrics-dataset
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/
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
Aggarwal R (2019) Bi LSTM, Jul 4, 2019. https://medium.com/@raghavaggarwal0089/bi-lstm-bc3d68da8bd0
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
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
Briot J-P, Pachet F (2017) Music generation by deep learning—Challenges and directions. Accessed from http://arxiv.org/abs/1712.04371
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
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
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
Aarthi D, Viswanathan V, Nandhini B, Ilakiyaselvan N (2019) Question classification using a rule based model. Int J Innov Technol Explor Eng 9(1)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
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
DOI: https://doi.org/10.1007/978-981-99-1051-9_24
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-1050-2
Online ISBN: 978-981-99-1051-9
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)