← 返回
未分类 Key 中文

Video Translation

Translate and dub videos from one language to another, replacing the original audio with TTS while keeping the video intact.
将视频翻译并配音,使用 TTS 替换原声,保持视频画面不变。
babysor
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 205
下载
💾 10
安装
1
版本
#latest

概述

Video Translation

Translate a video's speech into another language, using TTS to generate the dubbed audio and replacing the original audio track.

Triggers

  • translate this video
  • dub this video to English
  • 把视频从 X 语译成 Y 语
  • 视频翻译

Use Cases

  • The user wants to watch a foreign language YouTube video but prefers to hear it in their native language.
  • The user provides a video link and explicitly requests changing the audio language.

Workflow

When the user asks to translate a video:

  1. Download Video & Subtitles:

Use the youtube-downloader skill to download the video and its subtitles as SRT. Make sure you specify the source language to fetch the correct subtitle.

```bash

python path/to/youtube-downloader/scripts/download_video.py "VIDEO_URL" --subtitles --sub-lang -o /tmp/video-translation

```

  1. Translate Subtitles:

Read the downloaded .srt file. Translate its contents sentence by sentence into the target language using the following fixed prompt. Keep the exact same SRT index and timestamp format!

Translation Prompt:

> Translate the following subtitle text from to .

> Provide ONLY the translated text. Do not explain, do not add notes, do not add index numbers.

> The translation must be colloquial, natural-sounding, and suitable for video dubbing.

Save the translated text into a new file translated.srt.

  1. Generate Dubbed Audio:

Use the tts skill to render the timeline-accurate audio from the translated SRT. The Noiz backend automatically aligns the duration of each sentence to the original video's subtitle timestamps.

To ensure the cloned voice matches the original speaker's exact tone and emotion for each sentence, pass the original video file to --ref-audio-track. The TTS engine will automatically slice the original audio at each subtitle's exact timestamp and use it as the reference for that specific segment.

Create a basic voice_map.json:

```json

{

"default": {

"target_lang": ""

}

}

```

Render the timeline-accurate audio:

```bash

bash skills/tts/scripts/tts.sh render --srt translated.srt --voice-map voice_map.json --backend noiz --auto-emotion --ref-audio-track original_video.mp4 -o dubbed.wav

```

  1. Replace Audio in Video:

Use the replace_audio.sh script to merge the original video with the new dubbed audio.

```bash

bash skills/video-translation/scripts/replace_audio.sh --video original_video.mp4 --audio dubbed.wav --output final_video.mp4

```

  1. Present the Result:

Return the final_video.mp4 file path to the user.

Inputs

  • Required inputs:
  • VIDEO_URL: The URL of the video to translate.
  • target_language: The language to translate the audio to.
  • Optional inputs:
  • source_language: The language of the original video (if not auto-detected or specified).
  • reference_audio: Specific audio file/URL to use for voice cloning instead of the dynamic original video track.

Outputs

  • Success: Path to the final video file with replaced audio.
  • Failure: Clear error message specifying whether download, TTS, or audio replacement failed.

Requirements

Install: clone or copy the skills/youtube-downloader directory from crazynomad/skills into your skills/ folder so that skills/youtube-downloader/scripts/download_video.py is available.

If not already in this repo: clone or copy the skills/tts directory from NoizAI/skills into your skills/ folder. Ensure skills/tts/scripts/tts.sh and related scripts are present.

  • NOIZ_API_KEY configured: bash skills/tts/scripts/tts.sh config --set-api-key YOUR_KEY
  • ffmpeg installed.

Limitations

  • The source video must have subtitles (or auto-generated subtitles) available on the platform for the source language.
  • Very long videos may take a significant amount of time to translate and dub.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-12 05:54 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,241
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,908
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,593