gitmyhub

dbbasic-face

Python ★ 1 updated 17d ago

A browser puppet that lip-syncs a cartoon character to text-to-speech audio and follows typed stage directions like an actor's script.

Node.jsJavaScriptSVGffmpegsetup: moderatecomplexity 3/5

Puppet Stage is a tool that turns a simple cartoon character in your browser into a talking, gesturing puppet, controlled by typed text instead of animation software. You write lines like an actor's script, mixing plain spoken dialogue with bracketed stage directions such as walk, wave, or look left, and the character performs them live in the browser.

The speech comes from a text to speech engine already built into your computer, such as macOS's built in voice or the free espeak program on Linux. A separate open source tool called Rhubarb Lip Sync then listens to that generated speech and works out which mouth shape the character should show at each moment, so the lips move roughly in time with the words. If that lip sync tool is missing, the mouth still moves based on how loud the audio is at each instant, as a fallback.

Each character is defined by an SVG image and a small JSON file describing its parts, such as which shape is the mouth, how the eyes blink, and what named actions like waving or bowing look like, so new characters can be created without writing any code. Two sample characters are included to show a simple version and a more detailed one.

The project runs as one small Node.js server plus a static web page, with no external JavaScript packages required beyond what is built in. You can control the puppet from a text box in the browser, from a prewritten script, or by sending commands from the command line, and multiple browser tabs watching the same server will all show the same performance at once. It also supports splitting the screen into multiple framed characters side by side, similar to a news broadcast, complete with captions and simple scene transitions. The README does not mention a license.

Where it fits