lip_sync
Get a frame-by-frame mouth animation plan for dialogue text, specifying mouth positions, durations, and timing for a game engine — via a character spritesheet or preset viseme count.
Instructions
Get the frame-by-frame lip-sync plan for a line of text — which mouth position to show, for how long, and how far through the text it lands. Free, and nothing is rendered: use this instead of talking_gif when animating in a game engine and driving the mouth yourself. Provide character_id (response also carries the spritesheet URL and row to read) or a bare viseme_count preset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mood | No | Which stored expression to use (defaults to the character's first). Only valid with character_id | |
| text | Yes | The line of dialogue to lip-sync | |
| hold_ms | No | Extra time on the final closed mouth (default 600) | |
| frame_ms | No | Milliseconds to hold each mouth position (default 90) | |
| character_id | No | Use the mouth positions stored on this character; the response then also carries the spritesheet URL and the row to read. Mutually exclusive with viseme_count | |
| viseme_count | No | Plan against a preset without touching a character — useful if you hold the frames yourself. Mutually exclusive with character_id |