#3548 uv run cli.py --task vtv --name "视频路径" --source_language_code "源语言" --target_language_code "目标语言" [可选参数],用这个命令为什么不能直接翻译出

154.3* Posted at: 5 hours ago 👁10

uv run cli.py --task vtv --name "视频路径" --source_language_code "源语言" --target_language_code "目标语言" [可选参数],用这个命令为什么不能直接翻译出中文配音视频?

1 Replies

这是因为命令行模式默认配置可能未指定配音渠道和角色,导致只生成翻译后的字幕而没有配音。

要使用命令行模式生成带中文配音的视频,需要额外指定配音相关的参数。以下是解决方案:

  1. 检查必要参数:确保至少指定了以下核心参数:

    • --tts_type:指定配音渠道(例如,使用 Edge-TTS 免费渠道可设为 1)。
    • --voice_role:指定配音角色(例如,中文女声可设为 zh-CN-XiaoxiaoNeural)。
    • --subtitle_type:指定字幕嵌入方式(例如,嵌入硬字幕可设为 1)。
  2. 完整的命令行示例

    uv run cli.py --task vtv --name "D:/video.mp4" --source_language_code en --target_language_code zh --tts_type 1 --voice_role "zh-CN-XiaoxiaoNeural" --subtitle_type 1
    • --tts_type 1 对应 Edge-TTS 渠道。
    • --voice_role "zh-CN-XiaoxiaoNeural" 是 Edge-TTS 的中文女声角色。
    • --subtitle_type 1 表示嵌入硬字幕。
  3. 查看所有可用参数:运行 uv run cli.py --help 可以查看 vtv 任务支持的所有参数及其说明,根据需要进行配置。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource