Tuned-in Top Gun fans know that Val Kilmer and his character Tom “Iceman” Kazansky have a few things in common, and perhaps their most notable similarity is the fact that in Top Gun: Maverick, both of them have lost the ability to speak due to cancer. Kilmer does, however, have one line of spoken dialogue in the new sequel, and it took some artificial intelligence to bring it to life.
Kilmer — whose throat cancer treatment reduced his voice to a rasp back in 2014 — announced last year that he had partnered with the software company Sonantic to realistically recreate his old speaking voice for the documentary Val. Using hours and hours of audio, this process was used again for Kilmer’s appearance in Top Gun: Maverick.
Sonantic used what they call a “voice engine” to teach the A.I. voice model how to do an accurate impression of Kilmer. But for a blockbuster of Top Gun-sized proportions, the company needed to up the ante: Sonantic told Fortune that “the engine had around 10 times less data than it would have been given in a typical project, and it wasn’t enough.” The company came up with “new algorithms that could produce a higher-quality voice model using the available data.”
“I’m grateful to the entire team at Sonantic who masterfully restored my voice in a way I’ve never imagined possible,” Kilmer said in 2021. “As human beings, the ability to communicate is the core of our existence and the side effects from throat cancer have made it difficult for others to understand me. The chance to [use] a voice that feels authentic and familiar, is an incredibly special gift.”
“In the end, we generated more than 40 different voice models and selected the best, highest-quality, most expressive one,” Sonantic CTO and cofounder John Flynn added in a statement to Fortune. “Those new algorithms are now embedded into our voice engine, so future clients can automatically take advantage of them as well.”
Turns out A.I. makes a pretty good wingman (pun intended). Top Gun: Maverick is in theaters now. If you need a little refresher after the 30-year wait between the original and the sequel, check out Consequence‘s crash-course in all things Maverick.