Try it

Give the face a voice

0 of 400 characters

Or pick a sentence

Choose a voice to speak, or hear a sample first.

Your text, and any audio you record or upload, stays on this page. A voice model of about 110 MB downloads once when you choose a voice; older phones can be slow.

A short sample made with the demo voice, so you can see the mouth move before the voice has loaded.

Your recording stays on your device. Nothing is uploaded.

Microphone level Up to 0:30

Upload an audio file

Your file stays on your device. Nothing is uploaded.

Or drop an audio file here
Audio files your browser can open, such as WAV or MP3 · up to 25 MB and 90 seconds

Leave it empty to animate the mouth from the sound alone. Type the words to time the mouth to them (English only).

Mode: from sound only

Voices and the 3D head

Speaking with the light voice.

Light voice

Kokoro voices

Three voices from the open Kokoro speech model, one each for a feminine, a neutral and a masculine face. They run in this browser and nothing you type is sent anywhere. Each file is checked against its size and checksum before it is used. On some devices, especially phones, they may speak slower than real time.

These samples were made once and are plain audio files; the voices themselves download only if you press the button.

The page is getting the voice ready. You can type or pick a sentence meanwhile.

Video of the face speaking

Speak something first, or record or upload some audio: the video is made from the last utterance.

Video options

MP4 where your browser can make it, WebM otherwise. Made in this browser; nothing is uploaded.

Face: 2D or 3D

Drag the lips to move them. Tap or press arrow keys on the mouth.

A face made for this demo. Not a real person.

Speak first. Then drag the handle, or tap the waveform, to see the mouth at any moment.

Mouth: at rest (no speech yet).
Customise the face
Motion and detail
Motion

Natural: the jaw, lips and tongue have weight and glide between shapes. Raw: the mouth follows the blended shapes the library gives, with no weight added.

Articulation

Soft: a small, gentle opening and long blends. Natural: a little more. Crisp: a wider opening and quicker, sharper shapes. The closed lips of P, B and M and the lip tuck of F and V stay exact in all three.

30%

How much of the movement the library asks for the mouth shows. 30% is the library default; 100% is the full movement. Closed lips for P, B and M still meet at every setting.

1×

A very small, slow movement of the head that follows how loud and how high the voice is: about half a degree at 1, two degrees at 5. It is a subtle effect, much smaller than a real talker's head movement. It stays off when your device asks for reduced motion.

The last utterance

Zoom

Press anywhere on the waveform to put the handle there, and drag to scrub: the mouth shows each moment and there is no sound while you hold. Keys: Left and Right move 20 ms, Shift with them 100 ms, Page Up and Page Down jump to the previous or next sound, Home and End go to the ends, Space or Enter plays from here. Click a sound block to jump to its start. A pale block with stripes is a pause. A long utterance scrolls inside the box.

Sounds: none yet.

Download the last utterance

Made in your browser from the last utterance. Nothing is uploaded.

Speak something first: the downloads are made from the last utterance.

Readout

Timing method
–
Chunks
–
Audio
–
Synthesis time
–
Real-time factor
–
Lag, median (p50)
–
Lag, p95
–
Frames measured
–

Lag: how late a frame that shows a mouth shape is drawn compared with when you hear its sound; the browser’s own estimate. A negative number means the mouth was drawn slightly before the sound; it is a script-side estimate, not a measurement of what is painted on screen. It is measured when the page draws the frame, not when your screen lights up. Real-time factor is synthesis time divided by audio length; under 1 means the voice is made faster than it is spoken.

How it works

Four steps turn a sentence into a moving mouth. Each step shows your own words from the last run; before the first run it shows an example, marked example. All four steps are always on the page; the buttons only move the marker.

Step 1 of 4: Words
  1. 1. Words example

    It starts with the text, exactly as typed.

    Try it on the face

  2. 2. Sounds example

    The voice engine turns the words into the sounds it will say, written in the International Phonetic Alphabet (IPA). The library reads that string and names each sound with a short code. A phoneme is one speech sound.

    IPA string

    Phonemes (a gap between words is a pause)

      Try it on the face

    1. 3. Timing example

      Now each sound needs a place in time. The library looks at the audio and spreads the sounds across the stretches where the voice is loud (it calls this energy-quantile). Quiet stretches get little room, and pauses land where the audio really pauses. This is an estimate from loudness, not a forced alignment: it does not listen for which sound is which.

      Try it on the face

    2. 4. Mouth example

      Every sound belongs to one of 15 mouth shapes, called visemes (the names below are the standard Oculus set). The library turns the sounds around a moment into 13 numbers between 0 and 1: how open the jaw is, how closed or rounded the lips are, where the tongue is. Coarticulation: The mouth starts forming the next sound before the current one ends, and keeps a trace of the last. That is why speech looks smooth. Move the handle on the waveform or play a sentence and the bars follow the moment you point at. The Motion switch beside the mouth chooses how the numbers move: Natural adds the weight of the jaw, lips and tongue, Raw does not. The Articulation switch chooses how much the mouth opens and how far the blending reaches: Soft, Natural or Crisp.

      Why the mouth has mass

      Real jaws and lips have weight, so they cannot jump between shapes. This page models that with a spring for each part, so the mouth glides.

      • thin line: what the blended sounds ask for (raw)
      • thick line: where the part really is (natural)

      Nothing yet.

      Moment: example, 0.00 s

      The 15 viseme names (the strongest at this moment is marked)

        The 13 numbers at this moment

          Try it on the face

        Four words, in plain language

        Phoneme
        One speech sound, like the “b” in “baby”.
        Viseme
        One mouth shape. Several sounds share a shape: P, B and M all look like closed lips.
        Coarticulation
        Neighbouring sounds blend: your mouth starts shaping the next sound before the last one has ended, and keeps a trace of the last.
        IPA
        The International Phonetic Alphabet, a way of writing sounds rather than spelling.

        For developers

        The library is three calls and no dependencies, plus two more for natural motion. Values below come from your last run example.

        First three segments, as JSON

        How to take it

        What is the library, and what is only the demo

        The library (src/)

        • IPA to phonemes: phonemesOf
        • Phonemes and audio to timed segments: alignPhonemes
        • Segments to the 13 mouth numbers, with the next sound anticipated and the last one carried over: weightsAt, createMouth (the model is coarticulate, with the styles Soft, Natural and Crisp)
        • Natural motion (springs with weight): bakeTrajectory, trajectoryAt, createSmoother, smoothVisemeWeights

        Demo only (demo/)

        • The speech worker (Kitten TTS on ONNX Runtime Web)
        • eSpeak NG inside the phonemizer package
        • The voice model, fetched from the programme CDN
        • This page and its placeholder mouth art

        Make it talk back

        The lip-sync needs only text. Anything that produces text can sit in front of it: a model on your own device, a server you run, or a provider you choose. The same three calls turn its reply into a moving mouth. No model is bundled with this page and none is called; the model is left to you.

        const reply = await yourModel(prompt);  // your model, wherever it runs (none is bundled or called by this page)
        await speak(reply);                     // text in: the voice, phonemesOf, alignPhonemes and weightsAt turn it into a moving mouth

        A design choice we like: when the model runs on your own device, your conversation can stay on your own device. You choose where it runs, and you need no account for that. If you send your words to a model that someone else runs, they go to that provider.

        What this does and does not claim

        Where the voice and the method come from

        Why we build things this way. We want every human to be sovereign: each person in charge of their own technology, able to see how it works, run it on their own device, take it with them and walk away when they choose. This page is made that way. The method is open source, the voice runs in your browser, your text stays there, and the code panel shows how to use it yourself.