Generated Images, Video and Voice

How Synthetic Voices Are Made From Recorded Speech

How computers learn to speak from recordings, how a voice can be cloned from a sample, and what that means for consent and safety.

Key takeaways

  • Speech models learn the link between text and sound from large sets of recordings with transcripts.
  • A generated voice separates, more or less, what is said from who seems to say it and how it is delivered.
  • Cloning can work from a short sample, though more and cleaner audio generally gives a closer match.
  • Copying a real voice requires clear permission, and laws on voice rights vary and keep changing.
  • Verify urgent requests through a second channel, because a familiar voice can be faked.

A modern synthetic voice is made by training a model on many hours of recorded speech paired with its text, so that it learns how written words turn into sound: the pronunciation, rhythm, pitch and tone. To imitate a particular person, the trained system is then adapted to that voice, or simply shown a short sample of it, and generates new sentences the person never said.

This brings real benefits, from screen readers to restored voices for people losing their speech. It also means a voice on a phone is no longer proof of who is calling.

What a voice is made of

Speech is a rapidly changing pattern of air pressure. Your vocal folds produce a buzz, and your throat, mouth and nose shape it. Differences in anatomy and habit give each voice its timbre, the quality that lets you tell two people apart on the same note.

Beyond timbre there is prosody: pitch rising and falling, which words get stress, how long you pause and how fast you go. Prosody carries much of the meaning. "You did that" can be praise, accusation or surprise.

A convincing synthetic voice has to get both right, along with accent and the small sounds of breathing and hesitation. A recording also includes the room and microphone, which a model may learn along with the voice.

From splicing to learned models

Early talking machines built sounds from hand-written rules and sounded plainly robotic. A later approach, concatenative synthesis, recorded one speaker reading a large script, cut the audio into small units and stitched them together. It could sound natural for familiar phrases and choppy elsewhere, and it could say nothing in a style that had not been recorded.

Statistical methods then modeled the properties of speech and generated them, which was flexible but often muffled. From the middle of the 2010s, neural networks greatly improved naturalness. DeepMind's WaveNet, announced in 2016, showed that a network could generate audio waveforms directly with striking quality, and many faster designs followed.

Broad stages in computer speech
1939 Bell Labs shows the Voder, played by a trained operator 1980s Rule-based synthesizers such as DECtalk reach everyday use 1990s Splicing recorded units gives more natural phrases 2016 WaveNet shows neural generation of raw audio 2020s Voices can be imitated from short samples 1939 Bell Labs shows the Voder, played by a trained operator 1980s Rule-based synthesizers such as DECtalk reach everyday use 1990s Splicing recorded units gives more natural phrases 2016 WaveNet shows neural generation of raw audio 2020s Voices can be imitated from short samples

Training: pairing text with sound

The starting material is audio with accurate transcripts. Developers cut it into sentence-length clips, remove noisy ones and mark the speaker. Where the transcripts come from automatic recognition, errors can creep in; see how speech recognition works.

The text is converted into units the model can use, sometimes letters, sometimes phonemes, the distinct sounds of a language. This step handles traps such as "read" in the past and present, or whether "St." means street or saint.

Many systems then predict an intermediate picture of sound, often a spectrogram, which charts how much energy appears at each pitch over time. A second network called a vocoder turns that into an audible waveform. Other systems predict compact audio codes one after another, in a way similar to how a language model predicts text, and decode the codes into sound. Some newer designs use noise-removal methods like those in image generation.

From a script to spoken audio
1 Prepare text Expand numbers and abbreviations, find the sounds 2 Add voice identity A summary of the target speaker's qualities 3 Predict sound pattern Timing, pitch and energy for each moment 4 Render audio A decoder or vocoder produces the waveform 5 Review A listener checks names, tone and errors Prepare text Expand numbers and abbreviations, find the sounds 1 Add voice identity A summary of the target speaker's qualities 2 Predict sound pattern Timing, pitch and energy for each moment 3 Render audio A decoder or vocoder produces the waveform 4 Review A listener checks names, tone and errors 5

How cloning a particular voice works

A model trained on thousands of speakers learns what voices have in common and how they differ. It can represent a new speaker as a point in that space, a list of numbers often called a speaker embedding, or it can take a short audio prompt and continue speaking in the same manner.

That is why a short sample can be enough for a recognizable imitation. Quality generally improves with more audio, recorded cleanly, with varied sentences and emotions. A second route fine-tunes the model on one person's recordings, which takes more material and can capture more of their habits.

Imitations still differ in ways that careful listeners may notice: flat emotion, odd pauses, a laugh that does not fit, mispronounced local names. Over a poor phone line, many of these clues disappear.

A related technique, voice conversion, takes someone's actual speech and changes it to sound like another person. The original speaker supplies the timing and feeling, which can make the result more lifelike.

Why it can run in real time

Producing audio means creating many thousands of sample values for every second of sound. The earliest neural waveform generators did this one sample at a time and were slow. Later designs generate many samples in parallel or work with a much more compact description of sound, so speech can now be produced faster than it is spoken on suitable hardware, and some systems run on a phone.

Speed matters for conversation. A voice assistant or automated phone agent has to recognize your words, decide on a reply and begin speaking after only a short pause. Some systems connect those stages in sequence. Others process audio more directly, which can preserve tone and allow interruptions.

It also matters for misuse, because an impersonator can potentially respond during a live call instead of playing a prepared clip. Do not assume that a caller is real because they answer your questions. Calling back on a known number still works, since it does not depend on judging the sound.

What synthetic voices are used for

  • Reading aloud for people who are blind, have low vision or find reading hard.
  • Voice banking: people facing speech loss record themselves in advance so a device can later speak in something like their own voice.
  • Navigation, announcements and assistants.
  • Narration for videos and books, which affects working voice actors; see AI audiobook narration.
  • Translation and dubbing that keeps a resemblance to the original speaker.

For publishing your own productions, AI voiceovers discusses quality and disclosure.

Quality and fairness

Voices are only as broad as their training audio. Languages and accents with fewer recordings tend to sound less natural, and a system may drift toward a dominant accent. Tonal languages, mixed-language sentences, technical terms and personal names deserve checking by a fluent listener.

You can often improve results by spelling a difficult name the way it sounds, adding punctuation to control pauses or using a pronunciation setting if the tool has one. Listen to the whole recording. A single misread number in medication instructions or a safety notice could matter a great deal.

Making your own voice model carefully

Say you want a copy of your own voice to narrate lesson videos. Choose a provider whose terms say plainly who may use the model, whether recordings train other systems and how to delete everything.

Record in a quiet, soft furnished room with the same microphone at a steady distance. Read varied material in the manner you want to hear later: if you want a warm teaching tone, do not record in a flat reading voice. Remove takes with coughs, traffic or stumbles.

Test with sentences that were not in the recordings, including numbers, names and questions. Protect the account with strong sign-in security, because whoever controls it can make you say things. Tell your audience the narration is generated from your voice.

Your voice identifies you. Copy only your own, or someone's with informed permission that states what it may be used for, for how long and how to withdraw. Performers in particular have raised concerns about contracts that grant broad rights to their voices; see the law of a performer's voice. Protection differs between countries and states, so get advice for commercial work.

Fraudsters use imitated voices to pose as relatives, bosses or officials. Simple defenses help.

Situation Defense
A relative calls in distress asking for money Hang up and call the number you already have
A manager asks by phone for an urgent payment Confirm through your normal approval process
A caller asks for a code or password Never give it
Family planning ahead Agree on a question or word to verify identity

Details of the pattern are in voice cloning scams. Detection software and watermarks exist, but neither is dependable enough to replace calling back.

Common questions

How much audio does cloning need?

It depends on the system and the quality wanted. Some can produce a rough likeness from seconds, while professional custom voices usually use far more studio recording. Assume that public clips could be enough for a short impersonation.

Can a synthetic voice express emotion?

Many tools let you choose styles or follow cues in the script, with mixed results. They reproduce the sound of emotion; this does not show that anything is felt.

It can still create liability, particularly in advertising or where listeners are misled. The answer depends on the place and the facts.

Written for 4ArtificialIntelligence with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 14 articles in Generated Images, Video and Voice →

Latest news on this topic