(AP) With some help from artificial intelligence, country music star Randy Travis, celebrated for his timeless hits like “Forever and Ever, Amen” and “I Told You So,” has his voice back.

In July 2013, Travis was hospitalized with viral cardiomyopathy, a virus that attacks the heart, and later suffered a stroke. The Country Music Hall of Famer had to relearn how to walk, spell and read in the years that followed. A condition called aphasia limits his ability to speak — it’s why his wife Mary Travis assists him in interviews. It’s also why he hasn’t released new music in over a decade, until now.

“Where That Came From,” which released Friday, is a rich acoustic ballad amplified by Travis’ immediately recognizable, soulful vocal tone.

Cris Lacy, Warner Music Nashville co-president, approached Randy and Mary Travis and asked: “’What if we could take Randy’s voice and recreate it using AI?,'” Mary Travis told The Associated Press over Zoom last week, Randy smiling in agreement right next to her. “Well, we were all over that, so we were so excited.”

“All I ever wanted since the day of a stroke was to hear that voice again.”

Lacy tapped developers in London to create a proprietary AI model to begin the process. The result was two models: One with 12 vocal stems (or song samples), and another with 42 stems collected across Travis’ career — from 1985 to 2013, says Kyle Lehning, Travis’ longtime producer. Lacy and Lehning chose to use “Where That Came From,” a song written by Scotty Emerick and John Scott Sherrill that Lehning co-produced and held on to for years. He believed it could best articulate the humanity of Travis’ idiosyncratic vocal style.

“I never even thought about another song,” Lehning said.

Once he input the demo vocal (sung by James Dupree) into the AI models, “it took about five minutes to analyze,” says Lehning. “I really wish somebody had been here with a camera because I was the first person to hear it. And it was stunning, to me, how good it was sort of right off the bat. It’s hard to put an equation around it, but it was probably 70, 75% what you hear now.”

“There were certain aspects of it that were not authentic to Randy’s performance,” he said, so he began to edit and build on the recording with engineer Casey Wood, who also worked closely with Travis over a few decades.

The pair cherrypicked from the two models, and made alterations to things like vibrato speed, or slowing and relaxing phrases. “Randy is a laid-back singer,” Lehning says. “Randy, in my opinion, had an old soul quality to his voice. That’s one of the things that made him unique, but also, somehow familiar.”

His vocal performance on “Where That Came From” had to reflect that fact.

“We were able to just improve on it,” Lehning says of the AI recording. “It was emotional, and it’s still emotional.”

Mary Travis says the “human element,” and “the people that are involved” in this project, separate it from more nefarious uses of AI in music.

“Randy, I remember watching him when he first heard the song after it was completed. It was beautiful because at first, he was surprised, and then he was very pensive, and he was listening and studying,” she said. “And then he put his head down and his eyes were a little watery. I think he went through every emotion there was, in those three minutes of just hearing his voice again.”

Lacy agrees. “The beauty of this is, you know, we’re doing it with a voice that the world knows and has heard and has been comforted by,” she says.

“But I think, just on human terms, it’s a very real need. And it’s a big loss when you lose the voice of someone that you were connected to, and the ability to have it back is a beautiful gift.”

They also hope that this song will work to educate people on the good that AI can do — not the fraudulent activities that so frequently make headlines. “We’re hoping that maybe we can set a standard,” Mary Travis says, where credit is given where credit is due — and artists have control over their voice and work.

Last month, over 200 artists signed an open letter submitted by the Artist Rights Alliance non-profit, calling on artificial intelligence tech companies, developers, platforms, digital music services and platforms to stop using AI “to infringe upon and devalue the rights of human artists.” Artists who co-signed included Stevie Wonder, Miranda Lambert, Billie Eilish, Nicki Minaj, Peter Frampton, Katy Perry, Smokey Robinson and J Balvin.

So, now that “Where That Came From” is here, will there be more original Randy Travis songs in the future?

“There may be others,” says Mary Travis. “We’ll see where this goes. This is such a foreign territory. There’s likely more on the horizon.”

“We do have other tracks,” says Lacy, but Warner Music is being as selective. “This isn’t a stunt, and it’s not a parlor trick,” she added. “It was important to have a song worthy of him.”