Every personal relationship is bound to hit a rough patch, sooner or later. Some recover, while others disintegrate. To stop this from happening, therapists now have a new tool at their disposal: artificial intelligence, or AI.

The framework designed by researchers from the University of Southern California and the University of Utah can estimate the length of each individual relationship by analyzing the tone of voice that partners use when addressing each other during problem-solving interactions. These acoustic features, once fed into the algorithm, provide cues for determining if there’s been any improvement (or deterioration) since the last therapy appointment, as well as the change in the relationship status.