It’s called a vocoder. It allows for (for instance) a monotone-sung piece of text to follow a set of midi notes, by modulating it using a carrier wave (I think. Please correct any inaccuracies!).
I use it sometimes in FL Studio when creating electronic music (plugin is called Vocodex).
Presumably they take the AI-generated voice and generate midi notes, and apply a vocoder to the voice, following the notes.