AI

Video Generation Skill with Voice Cloning and Animation

AI-powered video generation tool combining voice synthesis, background generation, text animation, and FFmpeg for TikTok/Xiaohongshu formats.

February 23, 2026
6 min read
By ClawList Team

Build Your Own AI Video Generation Skill: Voice Cloning, Animation & FFmpeg in One Pipeline

Posted on ClawList.io | Category: AI Automation | OpenClaw Skills


If you've ever dreamed of turning a single sentence into a fully produced social media video — complete with cloned voice narration, AI-generated backgrounds, and animated text — that dream is now an engineering reality. Developer @vista8 recently shared a self-built OpenClaw Skill that does exactly this, and the technical stack behind it is both elegant and replicable.

In this post, we'll break down the architecture, walk through each component, and show you how to think about building your own AI-powered video generation pipeline for platforms like TikTok (Douyin) and Xiaohongshu (Little Red Book).


The Architecture at a Glance

The core insight behind this skill is composability — instead of relying on a single monolithic video AI tool, @vista8 chained four specialized components together into a clean automation pipeline:

| Component | Role | |---|---| | Listenhub API | Voice cloning, speech synthesis, subtitle timeline control | | Seedream 4.5 | AI-generated background and cover images | | Manim Library | Programmatic text animation | | FFmpeg | Final video composition and encoding |

The result? A one-sentence-to-video workflow that outputs both 16:9 (YouTube/horizontal) and 9:16 (TikTok/vertical) formats simultaneously.

Let's unpack each layer.


Layer 1: Voice Cloning and Subtitle Synchronization with Listenhub API

The voice layer is arguably the most impressive piece. Rather than using a generic text-to-speech voice, this pipeline uses Listenhub API to:

  • Clone a target voice from a short audio sample
  • Synthesize speech from the script text
  • Generate a subtitle timeline with precise word-level or sentence-level timestamps

This timeline data is critical — it's the spine that synchronizes every other element in the video. When you know exactly when each word is spoken, you can trigger text animations, fade images, and time transitions with precision.

A simplified example of what this timeline output might look like:

{
  "segments": [
    { "start": 0.0, "end": 1.2, "text": "Welcome to our channel" },
    { "start": 1.2, "end": 2.8, "text": "Today we're talking about AI" },
    { "start": 2.8, "end": 4.5, "text": "and how it changes everything" }
  ],
  "audio_file": "output_voice.mp3",
  "total_duration": 4.5
}

With this data structure, downstream tools can subscribe to each segment and render corresponding visuals in lockstep with the narration. This is how professional video editors work — and now it's automated.


Layer 2: AI Background Generation with Seedream 4.5

Once the audio timeline is established, the next step is generating visually compelling backgrounds and cover images using Seedream 4.5, a high-quality AI image generation model.

For social media content, the cover image is everything — it's what stops the scroll. By integrating an image generation step directly into the pipeline, @vista8 ensures every video has:

  • A thematically relevant background generated from the script topic
  • A platform-optimized cover for Douyin and Xiaohongshu thumbnails
  • Consistent visual style that can be guided by prompt templates

Here's an example prompt template you might feed to Seedream for a tech topic video:

def generate_background_prompt(topic: str, style: str = "cinematic") -> str:
    return f"""
    Create a {style} background image for a short-form video about: {topic}.
    Style: modern, clean, vibrant colors, no text overlays.
    Aspect ratio: suitable for {style} composition.
    """

# Example usage
prompt = generate_background_prompt(
    topic="AI-powered automation tools for developers",
    style="futuristic digital"
)

The key advantage here is prompt-driven consistency — by templating your image prompts based on the script content, every video in a series maintains a coherent visual identity without manual design work.


Layer 3: Programmatic Text Animation with Manim

Manim (the Mathematical Animation Engine, originally built by 3Blue1Brown) is typically associated with math explainer videos — but @vista8 repurposes it brilliantly for subtitle and text overlay animations.

Why Manim over simpler alternatives? Because it gives you frame-accurate, code-driven animations that can be precisely timed to the Listenhub subtitle timeline. You can:

  • Animate individual words or characters onto the screen
  • Control easing, fade, slide, and scale effects programmatically
  • Export animation frames or video segments at exact timestamps

Here's a simplified Manim scene that fades in text segments based on timeline data:

from manim import *

class SubtitleScene(Scene):
    def __init__(self, segments, **kwargs):
        super().__init__(**kwargs)
        self.segments = segments

    def construct(self):
        for segment in self.segments:
            text = Text(segment["text"], font_size=48, color=WHITE)
            text.move_to(DOWN * 2.5)  # Position at lower third

            duration = segment["end"] - segment["start"]

            self.play(FadeIn(text), run_time=0.3)
            self.wait(duration - 0.6)
            self.play(FadeOut(text), run_time=0.3)

This approach gives you the kind of kinetic typography you see in high-production-value YouTube and TikTok content — all generated programmatically from your script.


Layer 4: Final Assembly with FFmpeg

With all assets ready — audio file, background images, and animated text video segments — FFmpeg acts as the final assembly line, merging everything into a polished output.

A typical FFmpeg command for this pipeline might look like:

ffmpeg \
  -loop 1 -i background.png \       # Static or animated background
  -i voice_output.mp3 \             # Cloned voice audio
  -i text_animation.mp4 \           # Manim text overlay
  -filter_complex \
    "[0:v][2:v]overlay=0:0[out]" \  # Overlay text on background
  -map "[out]" -map 1:a \
  -c:v libx264 -c:a aac \
  -t 30 \                           # Match audio duration
  -vf "scale=1080:1920" \           # 9:16 for TikTok
  output_9x16.mp4

# For 16:9 (YouTube/horizontal)
# Change scale to 1920:1080

The pipeline runs this twice — once for each aspect ratio — meaning you get both a TikTok-ready vertical video and a YouTube-ready horizontal video from a single execution.


Real-World Use Cases

This kind of pipeline isn't just a clever hack — it unlocks serious productivity for content creators and developers alike:

  • Content marketing automation: Turn a blog post summary into a narrated social video in minutes
  • Developer tutorials: Convert code documentation into voiced explainer clips
  • Product announcements: Generate multilingual video variants by swapping the voice clone
  • Educational content: Scale a single script into dozens of topic variations with different AI backgrounds
  • Personal branding: Maintain a consistent posting cadence on Douyin/Xiaohongshu without being on camera

Conclusion: One Sentence → One Video → Multiple Platforms

What @vista8 has demonstrated is more than a clever script — it's a blueprint for modular AI content automation. By treating voice, visuals, animation, and encoding as independent, composable services, the pipeline remains flexible and upgradeable. Swap Seedream for another image model. Replace Manim with MotionCanvas. Upgrade the voice API.

The underlying architecture stays the same.

For developers building OpenClaw Skills or exploring AI automation workflows, this stack is a masterclass in practical AI composition: pick the best specialized tool for each job, connect them with clean data contracts (like the subtitle timeline JSON), and let FFmpeg be the glue that holds it all together.

Want to build your own version? Start with the Listenhub API documentation to get your voice timeline working, then layer in image generation and Manim animations incrementally. The one-sentence-to-video future is closer than you think.


Original concept by @vista8. Technical breakdown and implementation examples by ClawList.io editorial team.

Tags: #AIVideo #VoiceCloning #FFmpeg #Manim #OpenClaw #ContentAutomation #TikTokTools #AIAutomation #DeveloperTools

Tags

#video-generation#voice-cloning#ai#automation#manim#ffmpeg

Related Articles