Can not you sleep. You’re going round and round. You want someone to read you a nice, healthy story before bed. And you want that someone to be actor Jimmy Stewart.

The sleep and meditation app Calm on Tuesday launched a new story for premium users told by Mr. Stewart, the beloved actor who starred in “It’s a Wonderful Life.” But the lulling voice in his ears doesn’t come from Stewart, who died in 1997. It’s a version of his signature accent generated by artificial intelligence.

“Well, hello. I’m James Stewart, but hey, you can call me Jimmy. I’m going to tell you a story tonight,” Mr. Stewart’s voice clone begins, telling listeners to get “nice and comfortable.”

“It is a moving story of love, loss, hope and joy,” the voice continues. “But above all, it is a wonderful story about dreams.”

The app is known for its “Sleep Stories,” stories read by celebrities like Idris Elba, Matthew McConaughey and Harry Styles to help users fall asleep. But for his Stewart story, he enlisted the help of Respectfula Ukraine-based company that uses artificial intelligence technology to produce synthetic speech and clone voices.

The story, written by Calm’s creative team, is the first of its celebrity narratives to use an AI-generated voice, a spokeswoman for the app said Tuesday, adding that the company collaborated closely with the actor’s estate. in the project. “Stewart is one of the most beloved actors ever, with a voice that is moving to many,” the spokeswoman said in an email.

Respeecher said CMG Worldwide, the company that handles Mr. Stewart’s licensing, approved the project. CMG Worldwide did not immediately respond to a request for comment.

To revive Mr. Stewart’s voice, Respeecher fed old recordings of the actor into its system to train it to recognize the voice. He then combined it with that of a voice actor who read the new story, said Alex Serdiuk, CEO and co-founder of Respeecher, in a video interview from kyiv.

“The voice is iconic. It’s very recognizable, she said, adding that it went well with Christmas. “It’s just an interesting story and does a lot to raise awareness about mental health.”

The increased use of AI to recreate images or voices of public figures in film, television and other content has become a controversial topic. Meta, for example, has introduced AI-powered characters based on celebrities like rapper Snoop Dogg and former NFL quarterback Tom Brady, which it will soon incorporate into its products.

Critics have raised questions about the ethics and regulation of the practice. The use of AI by studios and entertainment companies was among the concerns at the center of this year’s strikes by Hollywood writers and actors.

Last month, actor Tom Hanks and news anchor Gayle King warned their social media followers that their images had been used in unauthorized advertisements. Cybersecurity experts have also warned that technologies such as “voice spoofs” could help fraudsters steal from people or businesses or commit other crimes.

Mr. Stewart’s family gave their consent to the Calm project, depending on varietywhich previously reported the story.

RespectfulFounded in 2018, it has synthesized voices for 150 projects, including soccer coach Vince Lombardi for a video in a super bowl. She is currently working with Warner Music France, she said, on an “animated biographical film” of the French artist Edith Piaf, who died in 1963, which will use artificial intelligence to generate her image and voice. His technology can also produce voiceovers for media that would otherwise be laborious for actors to record, or convert recordings into other languages ​​using the original actor’s voice.

The company has said it does not allow its technology to be used for “deceptive uses,” including uses that would affect a subject’s privacy and ability to find work.

“In practice, this means we will never use a private person’s or actor’s voice without permission,” the site says, but adds that the company would allow “non-misleading uses” of historical and political figures.

Serdiuk said the company was aware of concerns around voice technology. They had introduced it with ethics policies that have only gotten stricter, he said, around obtaining consent to use any intellectual property. “We will not allow anyone to use our technology or tools to introduce a voice to which they have no right,” he said.

He added that he planned to listen to Jimmy Stewart’s story before going to bed that night.