video-translation
关于
This skill translates and dubs videos by downloading the source, extracting subtitles, translating the text, generating new audio with TTS, and replacing the original audio track. It's designed for use cases like localizing YouTube videos when a user requests a language change. Key capabilities include handling video downloads, subtitle processing, and audio synthesis while preserving the original video.
快速安装
Claude Code
推荐npx skills add NoizAI/skills -a claude-code/plugin add https://github.com/NoizAI/skillsgit clone https://github.com/NoizAI/skills.git ~/.claude/skills/video-translation在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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:
-
Download Video & Subtitles: Use the
youtube-downloaderskill to download the video and its subtitles as SRT. Make sure you specify the source language to fetch the correct subtitle.python path/to/youtube-downloader/scripts/download_video.py "VIDEO_URL" --subtitles --sub-lang <source_lang_code> -o /tmp/video-translation -
Translate Subtitles: Read the downloaded
.srtfile. 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 <Source Language> to <Target Language>. 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. -
Generate Dubbed Audio: Use the
ttsskill 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:{ "default": { "target_lang": "<target_lang_code>" } }Render the timeline-accurate audio:
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 -
Replace Audio in Video: Use the
replace_audio.shscript to merge the original video with the new dubbed audio. To keep the original video's non-speech audio background outside of translated segments, pass the--srtfile.bash skills/video-translation/scripts/replace_audio.sh --video original_video.mp4 --audio dubbed.wav --output final_video.mp4 --srt translated.srt -
Present the Result: Return the
final_video.mp4file 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
- Dependencies (other skills)
- youtube-downloader (crazynomad/skills) — SKILL.md
Install: clone or copy theskills/youtube-downloaderdirectory from crazynomad/skills into yourskills/folder so thatskills/youtube-downloader/scripts/download_video.pyis available. - tts (NoizAI/skills) — SKILL.md
If not already in this repo: clone or copy theskills/ttsdirectory from NoizAI/skills into yourskills/folder. Ensureskills/tts/scripts/tts.shand related scripts are present.
- youtube-downloader (crazynomad/skills) — SKILL.md
NOIZ_API_KEYconfigured for the Noiz backend. If it is not set, first guide the user to get an API key fromhttps://developers.noiz.ai/api-keys. After the user provides the key, ask whether they want to persist it; if they agree, either write/updateNOIZ_API_KEY=...in the project's.envfile or runbash skills/tts/scripts/tts.sh config --set-api-key YOUR_KEYto store it.ffmpeginstalled.
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.
GitHub 仓库
相关推荐技能
llamaguard
其他LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。
cost-optimization
其他这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。
quantizing-models-bitsandbytes
其他这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。
dispatching-parallel-agents
其他该Skill用于并行处理3个以上无依赖关系的独立故障,可为每个问题域分派专属Claude代理同时执行调查修复。它通过并发处理多个独立问题显著提升故障排查效率,特别适用于测试文件、子系统等无共享状态的场景。
