Animate a 2D Character From a Text Script: The Free CharAI Workflow, With Lip Sync to Your Own Voice
Ask an AI to animate a cartoon character twice and you get two slightly different characters. The coat changes shade. The nose drifts. The walk has a new bounce. For a one-off clip nobody notices. For a series, where the same grandmother has to walk into the same kitchen every week, it is the whole problem.
There is a second problem hiding behind the first. When a client says "hold the wave half a second longer," most AI animation can only start over. You regenerate the shot, and the new version fixes the wave and changes everything else.
CharAI, released free under the Apache 2.0 license on November 25, takes an old-fashioned answer to both. The character is a file. The film is a script. A note is one line.
The character is a file, the film is a script
Most AI animation produces pixels. CharAI produces instructions.
A character in CharAI is a "skin," a tiny text file, 1.3 to 2.2 KB in the author's examples. It holds the body as numbers (height measured in head lengths, how heavy, how lively, how stooped) plus a few vector shapes for the things that make the person who they are: the hair, the cardigan, the hat. The engine supplies the skeleton underneath, so the same file can walk, run, sit, wave and talk.
A film is a plain text script where each line is a time, a character and an instruction:
film "Hello" 6s
actor Kai = skin kai at 160
0.0 Kai: walk(to=700), face(happy)
2.0 Kai: say("Nice to meet you.", for=2)
Read that like a call sheet. At zero seconds, Kai walks to a spot on the stage looking happy. At two seconds, he says a line for two seconds. The engine works out every frame from the clock, the same way an animator's timing chart works out where a character should be at any moment.
Why that matters: because every frame comes from the script, changing one line changes only what follows from that line. The getting-started guide's first exercise is to change wave() to bow() in the example film and render again. Only the wave becomes a bow. Kai stays Kai.
Why this beats regenerating
The author measured what this saves on recurring work, once each, using Claude models. Two 30-second episodes on Claude Sonnet took 25 minutes with CharAI against 74 minutes for an approach where the agent hand-codes each film from scratch. The token counts (the units AI services bill by) dropped from 667,202 to 425,057.
The same README is honest about where it lost. On a single 30-second silhouette film with lots of scenery, the hand-coded version was cheaper, faster, and in the author's words, better-looking. That is the shape of the trade. CharAI pays off when you reuse the character. For a one-off art piece, it is the wrong tool.
That honesty is a good sign, and it tells you how to use it: build the cast once, then make many short films with them.
Put this into practice
This workflow assumes you have Claude Code, Anthropic's coding assistant that runs in your terminal, because that is the only way the author has tested the agent side. You can also drive the engine yourself without any AI.
What you need: Node 18 or newer, Chrome or Edge (it draws frames in the browser), and ffmpeg for MP4 files. Budget 15 minutes for setup if those are new to you.
1. Install it as a skill. From your project folder:
git clone https://github.com/riponcm/CharAI .claude/skills/charai
cd .claude/skills/charai
npm install
The install adds one browser-driving helper (puppeteer-core) and nothing else.
2. Ask for a character first, not a film. In Claude Code, try the getting-started guide's example: "Use CharAI to draw a character, a tall grandmother with a silver bun and a green cardigan, and show me her cast sheet." You get the skin file and a cast sheet, one picture of her in six poses: standing, walking, running, jumping, waving and sitting.
Look at that sheet like a character designer would. Is her height right? Does the cardigan poke through her arm when she waves? Does grey show at her neck (the guide says that means the main clothing color is not set)? Ask for fixes now. Every film you make later inherits this file.
3. Write a short film. Ask for 10 to 15 seconds with one or two characters. The getting-started guide suggests a courier handing a parcel to a baker at a door. The agent writes the script, runs a checker until it reports OK, makes a contact sheet of frames, looks at it, fixes what it sees, and renders. You can read the script yourself. It is short.
4. Give it your own voice. This is the step that turns a demo into something you would publish. Record the line yourself, or generate it with any voice tool, and save it as a WAV file. Then run the free Rhubarb Lip Sync tool on it:
rhubarb -f json -o lines/hello.json hello.wav
Point the character's line at that file with say("Hello", track="lines/hello.json"), give for the length of the clip, and render with your audio laid underneath:
node tools/render.cjs films/myfilm out.mp4 --fps=30 --audio=films/myfilm/lines/all.wav
The audio's zero point is the film's zero point, so place each say at the second its line starts in your sound file. Without a recording, CharAI guesses mouth shapes from the text, which is fine for an animatic and stiff for a finished piece.
5. Take notes as line edits. Wave too short? Add for= to it. Wrong expression on the reply? Change face(sad) to face(surprised) on that line. Render again. This is the loop the whole tool exists for.
6. Export for your edit. Besides MP4, CharAI exports transparent WebM, ProRes, PNG sequences and animated SVG, per its README. CharAI draws no scenery, so the transparent export is the useful one: drop the character over a painted background in your editor or compositor.
A few rules of thumb from the speech guide are worth stealing. Keep each spoken line under about four seconds and split longer speeches. Put the facial expression just before the line, and change it between lines rather than in the middle of one. For a talking close-up, frame from the head to the chest and let the camera follow the head.
Where it breaks
Side view only. This is the big one. No three-quarter view, no front view, so arms cannot cross in front of the body and elbows cannot point out sideways. If your series needs characters facing the camera, stop here. The author lists other views as the next step.
Flat cartoon style. You get clean vector characters, not painted or textured ones. Hands are simple. Hair and cloth swing on springs rather than real physics.
No scenery. CharAI draws people and props and leaves the background to you.
Lip sync is rough. The known-issues page says it plainly: mouths are small in side view, head nods are guessed from the text rather than the audio, the mouth rests for about half a second at commas, and a beard hides most of the movement. Close-ups will show this.
Small physical glitches. Feet can slide up to about 12 pixels for a single frame. Hugs between a grown-up and a small child pass slightly through the child's head. A handover can miss the object a little. All documented, none fatal for a web series, all visible on a big screen.
Very new, mostly unreviewed. The repo is a day old. The README says agents wrote all of the code and no person has reviewed it line by line yet. It has been tested on Windows; other systems and films longer than 30 seconds are untested, and only Claude models have driven the agent side.
Why this is the right idea, even if it is not your tool
Pull back from CharAI for a second and look at what it is betting on. Generated video is getting better every month, and every clip is still made from nothing, so every note costs a new clip. CharAI bets that for recurring characters, the expensive part should happen once and the cheap part should repeat. That is how traditional animation studios have always worked: a model sheet, a rig, timing charts. The AI here is the assistant who builds the sheet and writes the timing, not the camera.
Whether CharAI itself becomes part of your kit depends on whether side-view cartoons fit what you make. Explainers, kids' content, social series and animatics fit. Anything cinematic does not.
So start small. Build one character you would actually use, give her one line in your own voice, and then give the film a note and see how long the fix takes. If the answer is under a minute, you have found the part of animation this approach is for.
- Sources: CharAI on GitHub · Getting started · Speech and lip sync guide · Known issues · Rhubarb Lip Sync