What if artificial intelligence could diagnose post-traumatic stress disorder better and faster than a human?

A study published in the journal Depression and Anxiety on Monday claims just that: a new artificial intelligence program listens to patients talk to detect if someone has PTSD.

It nailed diagnosis rates 89 percent of the time.

“Our findings suggest that speech-based characteristics can be used to diagnose this disease, and with further refinement and validation, may be employed in the clinic in the near future,” Charles R. Marmar, a psychiatrist at New York University’s Langone Health, said in a statement.

Researchers had 131 veterans with PTSD and veterans who do not have PTSD complete diagnostic interviews while the program listened, and the program could usually tell if they were suffering from PTSD by analyzing their speech patterns.

The program associates certain ways of speaking with PTSD symptoms. Those who spoke in a less clear and less energetic manner were found to be more likely to suffer from PTSD. The researchers claim that traumatic events may harm sections of the brain that help someone process emotion, which affects how they speak.

PTSD is a prevalent concern among veterans, contributing to what’s been seen as a suicide epidemic in the veteran community. Around 20 veterans die by suicide daily; PTSD is often to blame.

PTSD doesn’t just come from a war setting. According to the Sidran Institute, 70 percent of Americans face a traumatic event in their lives; 20 percent of them will deal with PTSD. At any given moment, 13 million Americans struggle with PTSD.

Gale Lucas, a research assistant professor at the University of Southern California who studies human-computer interaction, told The Daily Beast that being able to quickly identify if someone is suffering from PTSD is crucial.

She said the sooner it’s diagnosed, the sooner a doctor can help the person suffering from the disorder—which means the voice can be a key tool in diagnosing and treating PTSD.

“One of the things that happens is people aren’t very aware of their likelihood of having PTSD,” Lucas said. “There are individuals outside of the warfighters of this country who don’t really know much about PTSD and think it’s for people who have seen a war or been abused or things like that and don’t realize events like car accidents can actually cause PTSD.”

Lucas said it could be extremely helpful if this program was put into an app so people could tell if they’re likely suffering from PTSD while they’re at home. She said many people don’t go to the doctor in the first place because they’re not aware they’re showing symptoms of having PTSD.

“If someone is having trouble and struggling, they may not realize it’s a mental health issue,” Lucas said. “They may think they’re stressed or they’re tired.”

That said, Lucas warned that this kind of technology could be used in more nefarious ways. She said a company like Apple could use Siri to analyze speech and sell that data to advertisers or health insurance companies. An app that uses this technology “could be done in a good way that’s very safe,” but it would have to be created by people who mean well and know how to keep this data safe so it doesn’t end up in the wrong hands.

As with any promising new technology, it comes with benefits and risks. All in all, Lucas said any new piece of technology that can help people get the help they need sooner is a potentially life-saving development.

“People that go undiagnosed are at greater risk than those who have a diagnosis and are seeking treatment,” Lucas said.