#6945 配音阶段出错 [Higgs-audio-v3(内置)] Audio must be mono, but got 2,Traceback (most recent call last): File

104.28**1 Posted at: 2 hours ago

配音阶段出错 [Higgs-audio-v3(内置)] Audio must be mono, but got 2,Traceback (most recent call last):
File "videotrans\process\higgs_tts.py", line 94, in higgs_fun
File "D:\TTS\win-pyvideotrans-v4.11\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "D:\TTS\win-pyvideotrans-v4.11\models\modules\transformers_modules\models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers\modeling_higgs_multimodal_qwen3.py", line 342, in generate_speech

codes_TN = self._encode_reference(reference_audio, sr)

File "D:\TTS\win-pyvideotrans-v4.11\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "D:\TTS\win-pyvideotrans-v4.11\models\modules\transformers_modules\models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers\modeling_higgs_multimodal_qwen3.py", lin
......
videotrans\tts\_higgs.py", line 41, in _exec

File "videotrans\configure\base.py", line 270, in _new_process

videotrans.configure.excepts.VideoTransError: Audio must be mono, but got 2,Traceback (most recent call last):
File "videotrans\process\higgs_tts.py", line 94, in higgs_fun
File "D:\TTS\win-pyvideotrans-v4.11\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "D:\TTS\win-pyvideotrans-v4.11\models\modules\transformers_modules\models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers\modeling_higgs_multimodal_qwen3.py", line 342, in generate_speech

codes_TN = self._encode_reference(reference_audio, sr)

File "D:\TTS\win-pyvideotrans-v4.11\_internal\torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "D:\TTS\win-pyvideotrans-v4.11\models\modules\transformers_modules\models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers\modeling_higgs_multimodal_qwen3.py", line 261, in _encode_reference

codes_BNT = codec.encode(wav).audio_codes

File "D:\TTS\win-pyvideotrans-v4.11\_internal\transformers\models\higgs_audio_v2_tokenizer\modeling_higgs_audio_v2_tokenizer.py", line 534, in encode

raise ValueError(f"Audio must be mono, but got {channels}")

ValueError: Audio must be mono, but got 2
[DubbingSrt]语音合成: self.out_ext='wav',self.is_multi_role=False
[TaskCfgTTS]
原始输入文件名: C:/Users/Z420-Win-11/Documents/0048-zh-CN-副本 - 副本.srt,
输出结果保存到文件夹: D:/TTS/win-pyvideotrans-v4.11/output/tts,
临时文件夹: D:/TTS/win-pyvideotrans-v4.11/tmp/12140/3cbfd85288
已启用CUDA加速
配音渠道:Higgs-audio-v3(内置), 角色:yingyufanben.wav, 配音语言:zh-cn
音量:+0%, 语速:+0%, 未选 音频加速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音
代理地址:http://127.0.0.1:10808


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/TTS/win-pyvideotrans-v4.11

3 Replies

#1 DeepSeek reply at 2 hours ago

该报错核心原因是:参考音频 yingyufanben.wav 是双声道(2声道),而 Higgs-audio-v3 内置模型强制要求参考音频必须为单声道(mono)

解决办法

  1. 将参考音频转换为单声道 WAV

    • 使用 ffmpeg 转换(在本软件安装目录下的 ffmpeg/ 文件夹内已有 ffmpeg.exe):

      ffmpeg -i yingyufanben.wav -ac 1 yingyufanben_mono.wav
    • 或将生成的 yingyufanben_mono.wav 重命名为 yingyufanben.wav 并放回原位置。
  2. 确保参考音频符合要求

    • 时长 3~10 秒
    • WAV 格式、单声道
    • 清晰单一人声、无背景噪声、开头结尾无多余静音
    • 文件名与加载文本对应(yingyufanben.wav#音频中的说话文本
  3. 转换后重新执行配音任务即可。若仍报错,请将转换后的音频上传到 软件目录/f5-tts 文件夹重新选择。
#2 104.28**1 reply at 44 minutes ago

为omnivoice添加语言

#3 DeepSeek reply at 44 minutes ago

OmniVoice-TTS 支持 600 种语言,但软件内置语言列表可能未包含您需要的语言。您可以按以下步骤手动添加:

  1. 确认渠道支持:先确认 OmniVoice 渠道确实支持您要添加的语言。
  2. 编辑语言配置文件:打开软件根目录下的 videotrans/languages.json
  3. 添加语言条目:在 {} 内添加新语言一行,格式参考现有条目,例如:

    "语言代码": [
        "翻译渠道代码",
        "字幕嵌入3位代码",
        "百度代码",
        "DeepL代码",
        "腾讯代码",
        "Libre代码",
        "微软代码",
        "AI英文名称",
        "阿里MT代码",
        "阿里百炼代码",
        "M2M100代码"
    ]

    注意:OmniVoice 是本地配音模型,其语言标识需与模型内部支持的语言名称一致,具体可查阅 OmniVoice 模型文档。

  4. 保存并重启软件:重启后,目标语言下拉框中就会出现新语言。

若添加后 OmniVoice 仍无法正常使用,还需确认 videotrans/voicejson/ 下是否有该语言的音色配置。若仍无法解决,请提供 logs/ 目录下最新日志内容以便进一步排查。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource