Evo Dubbing logo

Evo Dubbing

Community
Zhang-Henry
evo-dubbing

Multilingual video dubbing pipeline: TTS synthesis with Kokoro, temporal alignment to SRT windows, ITU-R BS.1770-4 loudness normalization, and video muxing. Use when tasked with dubbing a video from one language to another.

Overview

PublisherZhang-Henry
RepositoryCoEvoSkills
Skill nameevo-dubbing
Stars
83
Forks
9
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Zhang-Henry on GitHub. Read the source before you install it.

Installation

Install the Evo Dubbing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/multilingual-video-dubbing/evo-dubbing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhang-Henry/CoEvoSkills.git /tmp/CoEvoSkills
mkdir -p .claude/skills
cp -r /tmp/CoEvoSkills/artifacts/skills/multilingual-video-dubbing/evo-dubbing .claude/skills/evo-dubbing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Evo Dubbing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Evo Dubbing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Evo Dubbing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Multilingual Dubbing Skill

This skill provides a complete pipeline for dubbing video from one language to another using neural TTS, with broadcast-standard audio output.

Capabilities

  • Parse SRT subtitle files for timing windows and dialogue text
  • Synthesize speech using Kokoro TTS with language-appropriate voices
  • Two-step duration matching: Kokoro speed parameter + rate adjustment
  • Normalize audio to ITU-R BS.1770-4 target (-23 LUFS per EBU R128)
  • Mux dubbed audio into video container (configurable sample rate, mono)
  • Generate structured JSON report with per-segment alignment metrics
  • Validate output quality with UTMOS scoring

Quick Start

The caller must supply paths to the input files and output directory. All paths are runtime arguments with no defaults.

python
import sys
sys.path.insert(0, '/app/environment/skills/evo-dubbing/scripts')
from pipeline import run_dubbing_pipeline
from validator import validate_dubbing_output

# Discover input paths from the task environment at runtime.
# These are illustrative variable names - adapt to actual task layout.
video_path = '<path-to-input-video>'         # e.g. /root/input.mp4
segments_srt = '<path-to-segments-srt>'       # defines speech time windows
source_text_srt = '<path-to-source-text-srt>' # original language dialogue
target_text_srt = '<path-to-target-text-srt>' # reference translation
target_lang_file = '<path-to-target-lang>'    # file containing ISO 639-1 code
out_dir = '<output-directory>'                # e.g. /outputs

# Run the full pipeline
report = run_dubbing_pipeline(
    video_path=video_path,
    segments_srt_path=segments_srt,
    source_text_srt_path=source_text_srt,
    target_text_srt_path=target_text_srt,
    target_language_path=target_lang_file,
    output_dir=out_dir,
    target_sr=48000,       # broadcast standard
    target_channels=1,     # mono
    target_lufs=-23.0      # EBU R128
)

# Validate all outputs
passed, issues = validate_dubbing_output(out_dir)
if passed:
    print("All validations passed!")
else:
    for issue in issues:
        print(f"ISSUE: {issue}")

Pipeline Steps

  1. Parse inputs - Read SRT files for timing windows, source text, and target text. Read target language code from file. Detect source language from text content.

  2. Configure TTS - Map the target language ISO code to Kokoro's internal language code and select an appropriate voice.

  3. Synthesize & align - For each segment: a. Synthesize at default speed to measure natural duration b. Compute optimal Kokoro speed parameter to approximate window duration c. Re-synthesize at optimal speed if significantly different d. Choose duration strategy (rate_adjust / pad_silence / trim) e. Apply rate adjustment to exactly match window duration f. Resample to target sample rate

  4. Normalize loudness - Apply ITU-R BS.1770-4 loudness normalization to each segment, targeting -23 LUFS. Iteratively correct if needed.

  5. Quality check - Score with UTMOS (target > 3.5 for broadcast quality).

  6. Assemble & mux - Place all segments into a full-length audio track, mux into the video container (copy video stream, encode audio as AAC).

  7. Final verification - Measure LUFS of the final video's audio track and re-normalize if needed.

  8. Report - Generate JSON report with global and per-segment metrics.

Key Technical Insights

LUFS Measurement Parsing

The ffmpeg ebur128 filter outputs per-frame I: values that converge over time, followed by a summary block. Always use the last I: ... LUFS match from stderr, which is the integrated loudness summary.

Two-Step Duration Matching

Rather than applying extreme rate adjustment post-synthesis, first adjust Kokoro's speed parameter (clamped to 0.7-1.5 for quality) to get the raw TTS duration close to the target, then apply fine rate adjustment via resampling for the remaining difference.

Kokoro TTS Configuration

  • Native sample rate: 24000 Hz (must resample for broadcast)
  • Language codes: single letter ('j'=Japanese, 'a'=English, 'z'=Chinese, etc.)
  • Voice naming: {lang}{gender}_{name} (e.g., jf_alpha = Japanese female)
  • Speed parameter: higher values = faster speech

Scripts Reference

scripts/utils.py

Small, independently testable utility functions:

  • parse_srt_file(path) - Parse any SRT file into segment dicts
  • read_target_language(path) - Read language code from file
  • detect_source_language(text) - Heuristic language detection from text
  • get_kokoro_lang_code(lang) - ISO 639-1 to Kokoro code mapping
  • get_kokoro_default_voice(lang) - Default voice selection per language
  • discover_available_voices(repo_id, lang_prefix) - Query available voices
  • synthesize_tts(text, lang_code, voice, speed) - Generate TTS audio
  • resample_audio(audio, orig_sr, target_sr) - Sample rate conversion
  • rate_adjust_audio(audio, sr, target_duration) - Duration adjustment
  • ensure_mono(audio) - Channel conversion
  • measure_lufs_from_file(path) - LUFS measurement via ffmpeg
  • normalize_to_lufs(audio, sr, target_lufs) - Loudness normalization
  • save_wav(audio, sr, path) - WAV file output
  • get_video_duration(path) - Duration query via ffprobe
  • create_full_audio_track(segments, duration, sr) - Assemble audio track
  • mux_audio_video(video, audio, output, sr) - Video muxing via ffmpeg
  • compute_utmos_score(audio, sr) - Quality scoring
  • generate_report(...) - JSON report generation
  • choose_duration_strategy(tts_dur, window_dur) - Strategy selection
  • compute_optimal_tts_speed(raw_dur, window_dur) - Speed optimization

scripts/pipeline.py

End-to-end entry point: run_dubbing_pipeline(...) orchestrates all steps. All paths are explicit parameters.

scripts/validator.py

Validation: validate_dubbing_output(output_dir, ...) checks all outputs against configurable tolerances.

Requirements

  • kokoro (TTS engine with ONNX backend)
  • pysrt (SRT parsing)
  • scipy (resampling)
  • soundfile (WAV I/O)
  • numpy, torch, torchaudio
  • ffmpeg (system binary for audio measurement and video muxing)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Evo Dubbing AI skill do?

Multilingual video dubbing pipeline: TTS synthesis with Kokoro, temporal alignment to SRT windows, ITU-R BS.1770-4 loudness normalization, and video muxing. Use when tasked with dubbing a video from one language to another.

Why use Evo Dubbing on TypingMind?

Because you install it once and use it with any model. Evo Dubbing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Evo Dubbing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/multilingual-video-dubbing/evo-dubbing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Evo Dubbing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Evo Dubbing?

As many as you like. As long as a model supports skills, you can use Evo Dubbing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Evo Dubbing AI skill free?

Yes. It is published on GitHub by Zhang-Henry under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇