Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

A bug in preprocess pipeline: ValueError: mode must be 'r', 'w', or None, got: rb

Open colstone opened this issue 1 year ago • 2 comments

used system and hardware: ubuntu 20.04 and 4*3090

hi, I'm find a bug in RVC1006Nvidia zip file. The trackback is "ValueError: mode must be 'r', 'w', or None, got: rb".

i'm changed a part of code on "RVC1006Nvidia/infer/lib/audio.py":

original is:

def audio2(i, o, format, sr):
    inp = av.open(i, "rb")
    out = av.open(o, "wb", format=format)

i'm fixed it is:

def audio2(i, o, format, sr):
    inp = av.open(i, "r")
    out = av.open(o, "w", format=format)

so this is a small bug, but i hope this bug are fix it well.

colstone avatar Jun 08 '24 08:06 colstone

I was having the same issue after finally getting the WebUi working in a weird way (I don't wanna talk about the troubleshooting and installations rabbit hole I went down), and this manual fix appears to have worked for me. I can pre-process my audio now! (I'm using Linux Mint 21).

Boyishdude avatar Jul 07 '24 13:07 Boyishdude

Thank you, this fixed the latest release for me on Linux.

MagicD3VIL avatar Aug 08 '24 19:08 MagicD3VIL

Thank you very much colstone, this helped me as well.

Hielyr avatar Oct 17 '24 01:10 Hielyr

I was having the same error, fixing the code didn't work out for me, after reading some documentation i found out that the PyAV library from version onwards 10.0.0 doesn't support "rb" and "rw" as arguments for av.open(), so i fixed it by forcing version 9.2.0 in requirements.txt

av==9.2.0

02loveslollipop avatar Nov 11 '24 04:11 02loveslollipop