Giving a Voice Feelings
The same sentence, "I'm fine", can mean three different things depending on the voice behind it. Old machines could only say one of them, the flat one. This note is about how that changed.
Learning from listening
Around the middle of the 2010s the approach flipped from writing rules to learning from examples. Instead of linguists listing how to say things, a program (a neural network) listened to many hours of real speech together with the text, and worked out the patterns itself: where people pause, how a question rises, how a voice relaxes at the end of a sentence. Nobody told it these rules. The voices came out much smoother and more natural than the glued-together kind, though they still had mostly one even mood.
Reading the whole sentence first
The next step borrowed the kind of program behind chat assistants, called a transformer. What matters here is that it looks at the whole text at once and weighs every word against every other. It can notice that "she whispered" at the start of a line should change how the end of the line sounds.
A trick made speech fit this kind of program: sound is chopped into small chunks and each chunk gets a code, like a word. Then the program can write speech the way a chat assistant writes a reply, one piece after another. Once speech works like words, things from the text world carry over. Give it a few seconds of someone's voice and it keeps talking in that voice. Tell it in plain language to say a line sadly, or in a hurry, and it tries.
Where the feelings come from
The feelings are not added on top. The program learned from recordings in which people laughed, sighed, hesitated and sped up when excited, so those habits are part of its guess about how a text should sound. You can steer that guess in three ways: show it an example clip, describe the mood in words, or let it infer the mood from the text. I don't know which of the three works best, and I'd expect it to depend on the voice and the line.
Where it still goes wrong
The mood can drift during a long reading, a line can be over-acted, words can be skipped or invented, and a laugh can land in the wrong place. A voice copied from a few seconds of audio also raises plain questions about consent and scams.
Author: Ope Tags: #speech Links: [[How a Computer Learns to Talk]], [[Becoming Interactive]], [[Csm-1b Architecture]]