Can an artificial intelligence learn to write songs like a human artist?

That's the question researchers at the University of Toronto are trying to tackle, using a library of romance novels and images as inspiration for their computer program.

The A.I. draws on its romance-fuelled vocabulary to write one-of-a-kind songs based on images uploaded to its system, with fascinating (and often racy) results.

"For the first time in years, I could feel my heart beating as I drew a deep breath," it sang, in a song based on a Leonard Cohen photo.

"His expression was grim, and I could not help but notice that his hand was on my arm," said the lyrics, in response to a photo of CTV reporter Peter Akman.

CTV Peter from Hang Chu on Vimeo.


The A.I. often produces "unexpected" results, according to Hang Chu, a PhD student of computer science at the University of Toronto. "Some works are good and some are bad, but it's always fun to try," he told CTV News.

He explained that the A.I. automatically analyzes the content of an image and derives descriptions to match it, based on the words in its vocabulary.

"It's an interesting challenge to show that computers can actually create artistic things," said Raquel Uratsun, an associate professor in computer science and Canada Research Chair in Machine Learning and Computer Vision.

The team behind the A.I. plans to expand its vocabulary and make it more human-sounding in the future.

The Imposter 3 from Hang Chu on Vimeo.


But Sanja Fidler, another associate prof on the project, acknowledges it probably won't be stealing Justin Bieber's job anytime soon.

"I don't think people could connect with songs written by machines, by robots, as much as they could connect with what people write," she said.

With files from CTV National News reporter Peter Akman