Neural Karaoke: A Computer Wrote A Christmas Carol That May Haunt You : All Tech Considered A team of scientists at the University of Toronto has taught a computer to compose and perform its own Christmas song — one perhaps destined to be on a Westworld soundtrack.

Warning: This Christmas Carol May Haunt Your Dreams

Warning: This Christmas Carol May Haunt Your Dreams

  • Download
  • <iframe src="" width="100%" height="290" frameborder="0" scrolling="no" title="NPR embedded audio player">
  • Transcript

Move over Mariah Carey. There's a new holiday star in town.

Behold, a new Christmas carol for the 2016 holiday season! Have a listen:

Perhaps the flat delivery, the Christmas word salad and the elementary melody tipped you off to the computer-generated nature of this performance.

It's from a team at the University of Toronto Computer Science Department, which has been teaching a computer to write sing-along music. Dubbed "neural karaoke," this artificial intelligence system has been fed more than 100 hours of music to learn how to create simple melodies. It was also trained to recognize images and compose related lyrics.

Using an algorithm, the AI finds patterns in the data and essentially "learns" music — including beats and chords. It learned the correlation between lyrics and music notes from around 50 hours of pop songs, says Hang Chu, one of the researchers.

To inspire the computer's composition of the Christmas carol, Chu fed it one of the photos that popped up when he searched Google for "Christmas" — it's a decorated Christmas tree surrounded by wrapped presents.

"The algorithm recognizes the objects in this photo and then [composes] lyrics based on its understanding of the photo," Chu tells NPR's Morning Edition.

While it still needs some work — the AI recognized the tree's ornaments as flowers, for example — Chu says one day neural karaoke could be an app on all of our cellphones.

But for now, fear not, dear composers: You're not out of a job just yet. As Chu puts it, the best music is "produced by artists' own experiences and feelings — and nothing artificial intelligence [can do] can replace that."