As a musician/songwriter, one thing I find myself struggling with all too often is writing unique, compelling song lyrics. Metal lyrics in particular are especially difficult for me. Writer’s block is usually the issue, but even worse is when I come up with a great line to start but nothing to follow it.

Thanks to OpenAI and their GPT-3 API, this is no longer an issue. Now I can just write a few lines myself and let a trained model write the rest. Is it cheating? Probably. But is it fun? Definitely.

This post will demonstrate how to use Twilio Functions to assist in writing song lyrics by using OpenAI’s GPT-3 engine and their Completion API. Here are a few examples of interesting lyrics I was able to generate using this tool:

Cut out the heart of a living man, put it in a box made from the bones of your husband, and throw the box into the sea. The dead son will come back to life.

> Evil will be seen everywhere, laughing in the night, playing with our fears. The sorcerer, behind the black door. The master invites you to play the game.

The Man in the Moon is my friend and I will not leave this world.

Rock star band singing and headbanging

Twilio’s own Miguel Grinberg has recently published blog posts which go into detail about Open AI’s GPT-3 Language Model as well as how to use it to write a chatbot using Python. His posts contain a lot of background on the OpenAI technologies and although they’re not a prerequisite to this post they’re definitely worth reading through.

#code #tutorials and hacks #javascript

Writing Metal Lyrics with OpenAI's GPT-3 Engine, Twilio Functions, and JavaScript
1.40 GEEK