Workflow guide · Voice & dialogue

AI voice lines to lip-sync: TTS, then mouth animation

To turn dialogue text into mouth animation, make the voice recording first and run lip-sync on the final audio. Rhubarb creates timed cues for 2D mouth sprites. Our test covers audio preparation and Rhubarb, not a finished animated character in an engine. The Unity and Unreal routes below come from documentation, not our own engine tests. We measured 8 lines from 2 tools first: each starts with 0.04 to 0.22 s of silence, the same words ran up to 0.92 s apart between tools, and a new take changed one line's length by 0.70 s.

Tested 7 Nov 2026 · About 45 min · Needs engine basics · 5 steps · Printable checklist

You'll end up with: A levelled WAV of each voice line that you're licensed to ship, plus matching lip-sync: mouth-shape cues for 2D sprites, baked blendshape clips in Unity, or MetaHuman facial animation in Unreal.

  1. Voice line (TTS)
  2. Export WAV
  3. Lip-sync tool
  4. Play in engine
A voice line's waveform coloured by sound, above curves for the A, I, U, E, O and N mouth shapes

uLipSync turning a voice line into A, I, U, E, O and N mouth shapes. Source: uLipSync by hecomi (MIT licence) ↗

What we got when we ran it

We ran 4 game lines through ElevenLabs Eleven v4 and Inworld TTS-1.5 Max on fal.ai, at default settings with a voice picked for each line, then measured the files. ElevenLabs delivered a 128 kbps MP3 at 44.1 kHz and Inworld a 16-bit WAV at 48 kHz, both mono. The biggest surprises: every file has silence at both ends, and the same words ran up to 0.92 s apart between tools. Inworld also ran 1.5 to 5.4 LU louder than ElevenLabs, and its merchant line hit 0.0 dB true peak, so level them before they sit side by side in a game.

Line and toolLength (s)Silence at start (s)Silence at end (s)Words per secondGaps between sentences (s)Loudness (LUFS)True peak (dB)Cost (US$)
Blacksmith, ElevenLabs7.470.080.183.050.58-23.1-6.20.0097
Blacksmith, Inworld7.760.040.122.890.39-21.6-2.70.0012
Merchant, ElevenLabs7.810.120.152.650.23, 0.48-23.5-5.30.0088
Merchant, Inworld8.520.100.172.430.35, 0.47-18.10.00.0011
Villain, ElevenLabs7.550.100.182.610.39, 0.28, 0.36-23.0-3.70.0075
Villain, Inworld6.920.080.142.840.28, 0.15, 0.19-21.3-2.70.0009
Tutorial, ElevenLabs6.840.110.173.050.46-24.4-6.60.0080
Tutorial, Inworld5.920.220.163.610.24-22.2-2.80.0010
1,250 line as digits, ElevenLabs4.600.070.191.85One sentence-23.3-7.50.0028
1,250 line as words, ElevenLabs4.130.070.203.11One sentence-23.4-6.40.0052
1,250 line as digits, Inworld4.780.160.141.78One sentence-21.3-3.50.0004
1,250 line as words, Inworld3.680.140.313.72One sentence-22.7-3.50.0006

Silence means under -40 dB in ffmpeg's silencedetect. Words per second counts written words between the first and last sound. LUFS measures loudness and 1 LU is a 1 dB gap. True peak is the highest level reached, with 0 dB the ceiling. Cost is fal.ai's listed price: US$0.08 per 1,000 characters for ElevenLabs and US$0.01 for Inworld. The 1,250 line is "Bring 1,250 gold to gate 7 by 9:30.", or the same with the numbers written out, one take each. Three takes of the tutorial line ran 6.84, 6.84 and 7.08 s on ElevenLabs and 5.92, 5.36 and 6.06 s on Inworld. With three and ten as words, they ran 6.77, 6.84 and 6.84 s, and 5.70, 6.50 and 5.94 s. Later takes reached 0.31 s of silence at the start. A 24 kHz file can't hold anything above 12 kHz, which sat 26 to 42 dB below the rest of each line. ElevenLabs's MP3 starts about 0.025 s later than PCM from the same seed, which is under a frame at 30 fps. fal.ai's WAVs also carry a 13.7 kB C2PA record after the audio, marking them as AI-generated, and converting drops it.

Step 1the same for everyone

After that, pick 2D characters, Unity 3D or Unreal MetaHuman.

  1. Generate and export the voice line

    TTS means text-to-speech: the tool reads your script aloud in a generated voice. In a format name like wav_24000, the 24000 is the sample rate (24,000 samples a second), which is plenty for speech.

    1. Generate the line. On ElevenLabs's own API, choose a WAV output format, such as wav_24000, instead of the default MP3.
    2. On fal.ai, ElevenLabs has no WAV option, so convert what you get with ffmpeg, a free command-line audio tool. For the default MP3, run ffmpeg -i line01.mp3 -ac 1 -ar 24000 -c:a pcm_s16le line01.wav in a terminal. If you set output_format to pcm_24000, it arrives as a raw file with no header, so run ffmpeg -f s16le -ar 24000 -ac 1 -i line01.pcm line01.wav instead.
    3. Inworld on fal.ai already delivers WAV. Set sample_rate_hertz to 24000 if you want a smaller file than the default 48 kHz.
    4. Stick with WAV, because Rhubarb reads WAV or Ogg Vorbis, and Unity and Unreal import WAV directly.
    5. Write big numbers out as words. A line with 1,250 and 9:30 ran 4.60 s on ElevenLabs and 4.78 s on Inworld as digits, against 4.13 s and 3.68 s written out, even though that version has more words. Short numbers made no measurable difference: writing 3 and 10 as words stayed inside the normal change between takes. The button name E took a steady 0.24 s in all 5 takes we have word timing for.
    6. Even out the loudness with a plain gain. Measure with ffmpeg -i line01.wav -af ebur128=peak=true -f null - and read the I value, then apply the difference from your target. For a line 4.9 LU too loud, run ffmpeg -i line01.wav -af volume=-4.9dB -c:a pcm_s16le line01_level.wav in a terminal.
    7. Do any trimming before lip-sync, then run lip-sync on that exact file, because its cues are timed from the start of the file. If you trim by level, use about -40 dB: at -50 dB, Inworld's tutorial line showed no silence at the start at all.
    8. Save each line as its own file, with a name that won't change, and keep its script text next to it.

    In our test: Converting moved nothing: same length, the same silence to within 0.005 s, and loudness within 0.1 LU. It made an MP3 5.5 times bigger at 44.1 kHz, or 3 times at 24 kHz. Regenerating does move things, so redo lip-sync after every new take: the tutorial line ran 6.84 to 7.08 s on ElevenLabs and 5.36 to 6.06 s on Inworld. An ElevenLabs seed held it at 6.84 s twice, though the two files weren't identical. fal.ai offers no seed for Inworld. ElevenLabs's timestamps option gives word timings, but treat them as rough: the first word always started at 0.00 when sound began 0.07 to 0.12 s later, and after 1,250 it gave gold 1.28 s, against 0.32 s written out.

    You should see: A .wav file for each line. ffprobe, which comes with ffmpeg, shows pcm_s16le (16-bit WAV audio), mono, at the rate you chose. A little silence at each end is normal: ours had 0.04 to 0.22 s at the start and 0.12 to 0.18 s at the end, and none started or stopped abruptly.

    Watch out: Don't level with ffmpeg's loudnorm filter at its defaults. It wrote 192 kHz files over 4 times the size and landed between -24.0 and -22.5 LUFS when we asked for -23. A plain gain hit -23.0 on all 8 lines and left the length unchanged to the sample. Separately, on ElevenLabs's own API, 44.1 kHz WAV and PCM need the Pro plan or above. A lower rate like wav_24000 is fine for lip-sync.

    Waveforms of the tutorial line from ElevenLabs and Inworld on one time scale. ElevenLabs runs 6.84 s, with silences of 0.11, 0.10, 0.26, 0.46 and 0.17 s. Inworld runs 5.92 s, with silences of 0.22, 0.24, 0.15, 0.24 and 0.16 s.
    The same line from both tools, as delivered. Silence sits at both ends, and the gaps don't line up. Image: Gamedev AI Tools, Our own render.
    Three waveforms of the same line from the same Inworld voice. The takes run 5.92, 5.36 and 6.06 s, and the second sentence starts at 4.37, 4.06 and 4.46 s.
    Three takes, same words, same voice: the second sentence moves by 0.40 s. That's 12 frames at 30 fps, so cues from one take won't fit another. Image: Gamedev AI Tools, Our own render.
    Official video from ElevenLabs. Watch on YouTube ↗

    From the official docs: ElevenLabs API: create speech ↗

Then pick your path

2D characters

  1. Run Rhubarb on the line

    Rhubarb Lip Sync is a free command-line tool, which means you run it by typing a command in a terminal. It listens to a voice line and works out which mouth shape to show at each moment.

    1. Download Rhubarb Lip Sync from its GitHub releases page.
    2. Run rhubarb -o line01.tsv line01.wav in a terminal. The audio file goes last.
    3. Add -d line01.txt, a text file holding the line's script, so recognition follows your words.

    In our test: We ran this exact command on all 8 lines with Rhubarb 1.14.0, and it works as written. Each line took 2 to 4 s and gave 37 to 50 mouth changes, about 5 to 7 a second, none shorter than 0.04 s. It can't open an MP3 ("Could not open sound file"), so ElevenLabs's files need converting first. A 16-bit WAV, a stereo WAV, a 32-bit float WAV and an Ogg all opened, and so did fal.ai's Inworld WAV with its C2PA record, with the same cues as a converted copy. Going down to 24 or 16 kHz kept 95 to 100% of the time on the same mouth, and a 6 dB level change kept 93 to 100%. A new take of the same line matched only 24 to 77% of the time, and trimming the start changed about 10% beyond the shift, so run Rhubarb last, on the exact file you ship. Leaving out the script still matched 86 to 100% on these short English lines.

    You should see: A TSV file (a plain-text table) with a timestamp and a mouth-shape letter on each row.

    Watch out: Without -d, recognition is less reliable, so always pass the script text.

    A voice line's waveform above a strip of coloured blocks, one for each mouth shape Rhubarb chose, with an X block at the longest pause.
    One line through Rhubarb: its waveform, and the mouth shape it chose at each moment. Image: Gamedev AI Tools, Our own render.
    Official video from Rhubarb Lip Sync. Watch on YouTube ↗

    From the official docs: Rhubarb Lip Sync README ↗

  2. Choose the recogniser and output format

    A recogniser is the part of Rhubarb that works out which sounds are spoken. Pick the one that suits the line's language, and an output format your tools can read.

    1. Keep the default recogniser (-r pocketSphinx) for English lines.
    2. Use -r phonetic for other languages.
    3. Set -f to tsv, xml, json or dat to match what your engine or animation tool reads.

    In our test: The phonetic recogniser took 0.5 to 0.7 s a line, about five times faster, but matched the default only 44 to 73% of the time on these English lines, which backs up keeping the default for English. All four formats wrote fine: on a 7.8 s line, DAT was 298 bytes, TSV 368, JSON 2,538 and XML 2,671. We didn't load them into an engine.

    You should see: The output file is in a format your engine or tool can import.

    Watch out: The phonetic recogniser works for any language but is less precise on English, so only switch when you need to.

    From the official docs: Rhubarb Lip Sync README ↗

  3. Map mouth shapes to sprites

    A sprite is a 2D image drawn in the game. You draw a mouth sprite for each of Rhubarb's letters, then swap them in time with the line.

    1. Draw the 6 basic mouths, A to F. A is closed (for P, B and M), D is wide open and F is puckered.
    2. Optionally add G (F/V sounds), H (long L) and X (rest), or limit them with --extendedShapes.
    3. In game, read each row and show that letter's sprite until the next timestamp.

    In our test: By default it used all nine letters, A to H and X. With --extendedShapes "" it used only A to F, so X goes too and the mouth never fully rests. It rested on X in only 10 of the 23 pauses of 0.15 s or longer, and length didn't predict which, so don't expect every gap to close the mouth. The mouth started moving up to 0.11 s before the first sound. We measured the timing but didn't draw sprites or watch it on a face.

    You should see: The mouth changes in time with the audio, and rests on X in some of the pauses.

    From the official docs: Rhubarb README: mouth shapes ↗

Unity 3D

  1. Install uLipSync

    uLipSync is the Unity package this path uses to move a 3D face's mouth along with the voice line. You can install it from a git URL, a scoped registry or a .unitypackage.

    1. In Package Manager, choose Add package from git URL and enter https://github.com/hecomi/uLipSync.git#upm.
    2. Or add the npm scoped registry (scope com.hecomi).
    3. Or import the .unitypackage, together with Burst and Mathematics.

    You should see: uLipSync shows up in Package Manager and under Window uLipSync.

    Watch out: If you use the .unitypackage with VRM (avatar) models, add USE_VRM0X or USE_VRM10 as a scripting define symbol yourself.

    From the official docs: uLipSync README ↗

  2. Add the components

    Blendshapes are saved poses of a 3D face, like an open mouth, that animation can blend between. Phonemes are the basic sounds of speech, and uLipSync maps each one to a blendshape.

    1. Put an AudioSource and a uLipSync component on the character.
    2. Add uLipSyncBlendShape for the face's SkinnedMeshRenderer.
    3. Map the phonemes (A, I, U, E, O, N) to blendshapes.
    4. Connect uLipSync's On Lip Sync Updated event to uLipSyncBlendShape.OnLipSyncUpdate.

    You should see: The face blendshapes move while the clip plays in Play mode.

    From the official docs: uLipSync README ↗

  3. Create and calibrate a Profile

    A Profile tells uLipSync what each vowel sounds like. You fill it in by calibrating with real speech, then give it to the uLipSync component.

    1. Create a Profile and register the A, I, U, E, O vowels plus a breath phoneme.
    2. Calibrate with a microphone: hold Calib while you say each vowel.
    3. Or loop vowel clips with the calibration audio player.
    4. Assign the Profile to the uLipSync component.

    You should see: Each vowel lights up its own phoneme in the inspector.

    Watch out: Profiles made in uLipSync v2 don't work in v3, so recalibrate after upgrading.

    From the official docs: uLipSync README ↗

  4. Bake to an AnimationClip

    Baking turns the lip-sync into AnimationClips made of keyframes, which are values saved at points in time. The clips then play without any real-time audio analysis.

    1. Open Window uLipSync Baked Data Generator and convert your voice clips to baked data.
    2. Open Window uLipSync Animation Clip Generator and turn the baked data into keyframed clips.
    3. Adjust Sample Frame Rate and Threshold to control how many keys are written.

    You should see: AnimationClips with blendshape curves that play without real-time analysis.

    Watch out: Real-time analysis is slow on WebGL builds, so bake your clips for WebGL.

    From the official docs: uLipSync README ↗

Unreal MetaHuman

  1. Prepare the project and audio

    MetaHuman Animator turns audio into facial animation for a MetaHuman, one of Epic's realistic digital humans. First set up the engine and bring in the voice line.

    1. Use Unreal Engine 5.6 or later.
    2. Enable the MetaHuman Animator plugin.
    3. Import the WAV so it becomes a SoundWave asset.

    You should see: A SoundWave asset in the Content Browser.

    From the official docs: Epic: audio-driven animation ↗

  2. Process the audio in a MetaHuman Performance

    A MetaHuman Performance asset processes the voice line into facial animation. You see the result in Sequencer, Unreal's timeline editor for animation and cutscenes.

    1. Create a MetaHuman Performance asset and open it.
    2. Set Input Type to Audio and choose the SoundWave.
    3. Set the Visualization Mesh to your MetaHuman face.
    4. Optionally, set head movement, blinks, the process mask (full face or mouth only) and mood.
    5. Click Process.

    You should see: Facial animation tracks appear in Sequencer.

    Watch out: Turning on Realtime Audio removes head motion and hides the other solve options.

    From the official docs: Epic: audio-driven animation ↗

  3. Export, or drive it live

    Export the processed animation so it plays on the face, or use Live Link, Unreal's system for streaming live animation data, to move the lips as someone talks into a microphone.

    1. Use Export Animation to get an Animation Sequence.
    2. Or use Export Level Sequence, with your MetaHuman Blueprint assigned.
    3. For live speech, add a MetaHuman (Audio) Live Link source.
    4. Set that source as your character Blueprint's Live Link subject.

    You should see: An Animation Sequence that plays on the face, or lips that follow a microphone live.

    Watch out: Processing in a Performance asset is offline, even with the realtime solver. Use the Live Link source for true real-time.

    From the official docs: Epic: using a MetaHuman audio source ↗

Before generating your voice lines, read ElevenLabs vs Inworld AI. The lip-sync work starts after you have a final recording.

Before you ship: pick a TTS plan that allows commercial use

  1. Use a paid ElevenLabs plan, because paid plans include a commercial licence.
  2. Don't ship lines made on the Free plan. Free-plan audio isn't licensed for commercial use.
  3. Avoid Beta features for any line you'll ship. ElevenLabs excludes Beta output from commercial and production use.

Watch out: Free-plan audio stays non-commercial even if you credit ElevenLabs, so regenerate those lines on a paid plan before release.

From the official docs: ElevenLabs: can I publish what I generate? ↗

Questions

Can I turn text straight into mouth animation with this workflow?

Not directly. Make a voice recording from the text first. Rhubarb analyses that recording and produces timed mouth-shape cues; a script text file can help recognition, but it does not replace the audio. You still need mouth sprites or a suitable character setup. Route explanation checked 10 Nov 2026. source

Did you test the Unity and Unreal routes?

No. Our 7 Nov 2026 run covered generated voice files, audio preparation and Rhubarb cues. We did not draw mouth sprites, test a face in an engine, run uLipSync or process a MetaHuman. Those routes use the official documentation linked on their steps.

Can I ship ElevenLabs Free-plan voice lines in a commercial game?

No. ElevenLabs says the Free plan doesn't include a commercial licence and can't be used for any commercial purpose, and content made outside a paid subscription, before or after it, can't be used commercially. All paid plans include a commercial licence, except for output from Beta features. source

Is Rhubarb Lip Sync free to use in a commercial game?

Yes. Rhubarb Lip Sync is released under the MIT licence, and its dependencies use MIT, BSD or similar permissive licences. Its licence summary says the lip-sync data it makes from your audio belongs to you, so if your game doesn't ship Rhubarb itself, you don't need to worry about the MIT licence. source

Does Rhubarb work on voice lines that aren't in English?

Yes, with the phonetic recogniser (-r phonetic). The default PocketSphinx recogniser only recognises English dialogue. The phonetic one works with any language but is usually less precise, so keep the default for English lines. source

Can uLipSync lip-sync at runtime, or only from baked clips?

Both. uLipSync can analyse the voice as an AudioSource plays it, including live microphone input, or pre-bake the data, which works with Timeline and can be converted to an AnimationClip. It's MIT-licensed and supports WebGL builds. source

We ran step 1 and the 2D route's Rhubarb steps ourselves on 7 Nov 2026: 27 voice lines from ElevenLabs Eleven v4 and Inworld TTS-1.5 Max on fal.ai, all measured with ffmpeg, and the 8 main ones converted, levelled and run through Rhubarb 1.14.0. We measured the files and the mouth timing, and didn't judge how the voices sound or how the mouths look on a face. We didn't draw sprites or play it in an engine, and we didn't run uLipSync or MetaHuman, so the Unity and Unreal routes aren't tested and come from the official documentation linked on each step. We didn't use ElevenLabs's own API either, so its wav_24000 format and plan limits come from its docs. Checked . Menus and settings change between versions, so follow the linked docs if something looks different. No vendor reviews or pays for these guides.

Take it with you

Printable checklist

Every step on one page, each with what you should see when it worked. Tick it off as you go, or print it.

Open the checklist

Get new guides by email

A short weekly email from Gamedev AI Tools: new AI tools for game devs, new guides and comparisons, ranking changes and price or licence changes. You also get our free cheat sheet of the top 3 tools for every job. Every email has an unsubscribe link.