RVC-Project / Retrieval-based-Voice-Conversion-WebUI

Easily train a good VC model with voice data <= 10 mins!
MIT License
19.71k stars 3.04k forks source link

fix: ValueError: mode must be 'r', 'w', or None, got: wb #1991

Closed blaise-tk closed 1 month ago

blaise-tk commented 1 month ago

On some computers the "wb" function could cause errors. At the moment I only saw it happen during the previous phases of the training so I only modified that.

Error sample:

  File "infer/modules/train/preprocess.py", line 87, in pipeline
    audio = load_audio(path, self.sr)
  File "/home/user/Desktop/RVC1006Nvidia/infer/lib/audio.py", line 73, in load_audio
    raise RuntimeError(traceback.format_exc())
RuntimeError: Traceback (most recent call last):
  File "/home/user/Desktop/RVC1006Nvidia/infer/lib/audio.py", line 63, in load_audio
    audio2(f, out, "f32le", sr)
  File "/home/user/Desktop/RVC1006Nvidia/infer/lib/audio.py", line 35, in audio2
    out = av.open(o, "wb", format=format)
  File "av/container/core.pyx", line 398, in av.container.core.open
ValueError: mode must be 'r', 'w', or None, got: wb