Psychiatrist Melvin McInnis was sitting in his University of Michigan office late one afternoon when the phone rang. It was a bipolar patient’s wife. “He’s talking faster and louder,” she told him, worry edging her tone. “He sounds different now. There’s something different about him.”

Three days later, McInnis saw his patient. Immediately, he knew the wife had predicted something potentially life-threatening. “He was revved up, charged up, and he was in this manic state,” McInnis says. “We had to petition him to go to the hospital.”

The speech patterns of someone who’s becoming ill are rather prominent.

Full-on manic episodes don’t happen too regularly, but when they do, they leave a trail of destruction behind them. Livelihoods and relationships are often leveled in their wake. For clinicians, bipolar patients, and their families, finding an early predictor or biomarker of a manic episode would be something of a holy grail.

McInnis believes that vocal clues could be the answer. That’s why, over the past year, he and his team have been collecting over a thousand hours of phone call audio from bipolar patients to develop an app that can alert them to when they’re losing touch with reality.

Bipolar disorder manifests a little bit differently in everyone, and so do the severity and frequency of mood swings. But the problem for bipolar patients and their loved ones is that those episodes are not always so recognizable. Not at first. Before a bipolar person slips into a full-blown manic episode, he often experiences something called hypomania–a lesser sensation, but also a very enjoyable high, McInnis explains. And while other people might notice subtle changes in a bipolar person, like a faster speaking voice and quick jumps between disparate thoughts, the change often remains stubbornly invisible to the person experiencing it.

“The speech patterns of someone who’s becoming ill are rather prominent,” McInnis says. “We asked the question: If a human being can detect a change in the properties of speech, can we train a computer using specified algorithms? Can a computer identify small shifts and changes in the acoustics that would predict changes?”

McInnis and his team, supported by the Prechter Bipolar Research Fund, are in the early experimental stages of testing an app that records audio from bipolar patients’ phones. The app then sends that data to an engineering lab at the University of Michigan, where a machine-learning program analyzes physical characteristics of the data, like pitch and energy. Ideally, the system would then send relevant information back to the patient, or maybe even a clinician. That way, a bipolar person might recognize the need to get help before it’s too late.