We built a poetry generator inspired by Taylor Swift lyrics using Markov chains. The project combined text
generation, AI voice synthesis, music, and visuals to explore computational creativity and style imitation.
Overview
Poetry is an art form that bridges emotion and creativity, but creating it can be challenging. Inspired by
Taylor Swift's poetic songwriting, we developed "Poetic Taybot", an artificial poetry generator that
uses Taylor Swift's lyrics as its muse. It was developed by Yanna Smid and me.
This project was created for the course Computational Creativity. We combined linguistic algorithms
with generative AI to create, present, and perform original poems. The goal was to build a poetry generator
using a Markov Chain trained on Taylor Swift's lyrics and to visualize the generated poems using AI-generated
voice, music, and art.
The Project
The project resulted in:
A poetry generator: Taylor Swift's complete discography (up to and including the album
Midnights) was cleaned and formatted as training data. We implemented a Markov Chain to generate poetic
verses, focusing on stylistic elements like alliteration and similes.
A creative visualization: selected poems were narrated using an AI voice synthesizer
mimicking Taylor Swift's vocal tone. A MIDI composition inspired by beat poetry and Taylor's themes was
created with AI. AI art visualized the mood and tone of each poem.
A few examples of generated poems can be seen below.
1 /
A few selected poems are presented in the video below, combined with an AI-generated voice, AI music, and AI visuals to deliver an immersive artistic experience.
Tools and Development
The following steps were completed to create this project:
Concept development: we drew inspiration from Taylor Swift's lyrical style and quickly decided to base our
generator on her lyrics.
Data collection: we collected all lyrics from every existing Taylor Swift album from a Kaggle dataset (nine
albums + three rerecorded albums) and converted them into TXT and CSV files.
Data preprocessing: text was cleaned by converting to lowercase, removing special characters, and
standardizing contractions and grammar.
Algorithm implementation: we built a Markov Chain in Python to generate short poems of no more than 60
characters. The algorithm paired words based on likelihood, generating sentences word by word. We added
fallback mechanisms and emphasized alliteration.
Visualization: we selected three poems to visualize, combining audio, visual, and text into a multimedia
presentation. We used ElevenLabs for voice synthesis, and Magenta for MIDI generation processed in Ableton
Live 11.