tts-gen

Generate a time-synchronized Chinese TTS WAV track from an SRT subtitle file.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/zlovexforever/zlx-claude-skills --skill tts-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tts-gen
Source: https://github.com/zlovexforever/zlx-claude-skills/tree/main/tts-gen
Command: npx skills add https://github.com/zlovexforever/zlx-claude-skills --skill tts-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires edge-tts, ffmpeg, pydub.

What problem does it solve?

This Skill eliminates the manual effort of recording and aligning Chinese voice audio to subtitle timestamps by generating a single time-synchronized WAV track directly from a Chinese SRT file.

Core Features & Use Cases

  • Chinese SRT → Time-synced TTS WAV: Synthesizes speech for each subtitle entry and places each segment into the correct timeline position.
  • Duration correction for synchronization: Measures synthesized audio duration and automatically speed-ups (up to 1.3x) or pads with silence to match the subtitle slot.
  • Edge TTS voice selection: Supports multiple Microsoft Edge TTS Chinese voice options (default: zh-CN-XiaoxiaoNeural), making it easy to match a desired narration style.
  • Use Case: After translating subtitles to Chinese (ZH SRT), generate the dubbed narration WAV aligned to the translated SRT so it can be used in a YouTube dubbing workflow.

Quick Start

Run the tts-gen skill to generate a synchronized dubbed audio file from your Chinese subtitle file named video_en_zh.srt.

Frequently Asked Questions about tts-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate time-synced Chinese TTS audio from an SRT subtitle file?

To generate time-synced Chinese TTS audio from an SRT subtitle file, this Skill synthesizes speech for each cue and aligns it to the subtitle timestamps using edge-tts, outputting a single synchronized WAV track.

How does subtitle synchronization work when the generated TTS audio duration doesn't match the SRT timestamps?

For subtitle synchronization when TTS audio duration mismatches SRT timestamps, the Skill automatically speeds up audio up to 1.3x or pads with silence to fit the exact subtitle slot duration on the timeline.

Can I use Microsoft edge-tts voices for Chinese SRT to WAV generation?

Yes, you can use Microsoft edge-tts voices for Chinese SRT to WAV generation, with support for multiple Chinese voice options like the default zh-CN-XiaoxiaoNeural to match your desired narration style.

Do I need ffmpeg and pydub to convert SRT subtitles into dubbed audio?

Yes, you need ffmpeg and pydub to convert SRT subtitles into dubbed audio, as ffmpeg handles MP3-to-WAV conversion and optional speed adjustment, while pydub manages the audio processing operations.

What is the maximum speed adjustment limit for aligning TTS audio to subtitle timestamps?

The maximum speed adjustment limit for aligning TTS audio to subtitle timestamps is capped at 1.3x, ensuring synthesized speech fits the slot duration without excessive distortion before padding with silence.

What's the best way to create a dubbed WAV track for a YouTube video from a translated Chinese SRT file?

The best way to create a dubbed WAV track from a translated Chinese SRT file is running this Skill, which synthesizes edge-tts speech and places each audio segment into its correct timeline position for YouTube workflows.