Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

something wrong icant solve #2397

Open
nnjuntr opened this issue Dec 6, 2024 · 3 comments
Open

something wrong icant solve #2397

nnjuntr opened this issue Dec 6, 2024 · 3 comments

Comments

@nnjuntr
Copy link

nnjuntr commented Dec 6, 2024

idont know why

(rvc) Z:\RVC1006Nvidia>infer-web.py
2024-12-06 20:41:18 | INFO | configs.config | Found GPU NVIDIA GeForce GTX 1660 SUPER, force to fp32
overwrite preprocess and configs.json
is_half:False, device:cuda:0
Z:\python\rvc\lib\site-packages\gradio_client\documentation.py:106: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
Z:\python\rvc\lib\site-packages\gradio_client\documentation.py:106: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
2024-12-06 20:41:21 | INFO | __main__ | Use Language: zh_CN
Running on local URL:  http://0.0.0.0:7865
2024-12-06 20:42:03 | INFO | httpx | HTTP Request: POST http://localhost:7865/api/predict "HTTP/1.1 200 OK"
2024-12-06 20:42:03 | INFO | __main__ | "Z:\python\rvc\Scripts\python.exe" infer/modules/train/preprocess.py "Z:\RVC1006Nvidia\runmusic\ottoxunlian" 40000 8 "Z:\RVC1006Nvidia/logs/otto" False 3.7
['infer/modules/train/preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
start preprocess
['infer/modules/train/preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
2024-12-06 20:42:08 | INFO | httpx | HTTP Request: POST http://localhost:7865/reset "HTTP/1.1 200 OK"
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
Z:\RVC1006Nvidia\runmusic\ottoxunlian/ottoxunlian.wav->Traceback (most recent call last):
  File "Z:\RVC1006Nvidia\infer\lib\audio.py", line 63, in load_audio
    audio2(f, out, "f32le", sr)
  File "Z:\RVC1006Nvidia\infer\lib\audio.py", line 34, in audio2
    inp = av.open(i, "rb")
  File "av\\container\\core.pyx", line 347, in av.container.core.open
ValueError: mode must be 'r', 'w', or None, got: rb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Z:\RVC1006Nvidia\infer\modules\train\preprocess.py", line 87, in pipeline
    audio = load_audio(path, self.sr)
  File "Z:\RVC1006Nvidia\infer\lib\audio.py", line 73, in load_audio
    raise RuntimeError(traceback.format_exc())
RuntimeError: Traceback (most recent call last):
  File "Z:\RVC1006Nvidia\infer\lib\audio.py", line 63, in load_audio
    audio2(f, out, "f32le", sr)
  File "Z:\RVC1006Nvidia\infer\lib\audio.py", line 34, in audio2
    inp = av.open(i, "rb")
  File "av\\container\\core.pyx", line 347, in av.container.core.open
ValueError: mode must be 'r', 'w', or None, got: rb


end preprocess
@StoneChin
Copy link

@nnjuntr Hi! You can refer to the discussion in this issue. It seems like this commit update last year make av.open() could only use w orr but not support rb anymore. There are 2 way to solve your problem:

  1. Change the file Z:\RVC1006Nvidia\infer\lib\audio.py line 34, in audio2
    inp = av.open(i, "rb") to inp = av.open(i, "r")
  2. Downgrading av from 12 to 11. In your project run the code pip install --force-reinstall -v "av==11.0.0".

Hope it helps~

Hi,这个问题在之前的issue中有讨论,看起来是由于python的pyav库升级导致目前av.open()函数不再接受rb作为参数导致的报错,你可以尝试:

  1. Z:\RVC1006Nvidia\infer\lib\audio.py 34行中找到inp = av.open(i, "rb")将其中的rb替换成r
  2. 将pyav库进行降级到11版本,在你的项目requirement.txt同级的文件夹下执行 pip install --force-reinstall -v "av==11.0.0"

希望对你有帮助

@nnjuntr
Copy link
Author

nnjuntr commented Dec 7, 2024

对不起,他继续运行了一段时间,但仍然发生错误

2024-12-07 17:26:56 | INFO | configs.config | Found GPU NVIDIA GeForce GTX 1660 SUPER, force to fp32
overwrite preprocess and configs.json
is_half:False, device:cuda:0
Z:\python\rvc\lib\site-packages\gradio_client\documentation.py:106: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
Z:\python\rvc\lib\site-packages\gradio_client\documentation.py:106: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
2024-12-07 17:26:59 | INFO | __main__ | Use Language: zh_CN
Running on local URL:  http://0.0.0.0:7865
2024-12-07 17:27:41 | INFO | httpx | HTTP Request: POST http://localhost:7865/api/predict "HTTP/1.1 200 OK"
2024-12-07 17:27:41 | INFO | __main__ | "Z:\python\rvc\Scripts\python.exe" infer/modules/train/preprocess.py "Z:\RVC1006Nvidia\runmusic\ottoxunlian" 40000 8 "Z:\RVC1006Nvidia/logs/otto" False 3.7
['infer/modules/train/preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
start preprocess
['infer/modules/train/preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
2024-12-07 17:27:46 | INFO | httpx | HTTP Request: POST http://localhost:7865/reset "HTTP/1.1 200 OK"
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
['Z:\\RVC1006Nvidia\\infer\\modules\\train\\preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
0-12-2.5173412377633975-filtered
0-53-2.701176094448265-filtered
0-183-3.207326924037213-filtered
0-238-2.574298070029763-filtered
0-358-2.5232391199713673-filtered
0-384-2.6790962019521336-filtered
Z:\RVC1006Nvidia\runmusic\ottoxunlian/ottoxunlian.wav->Suc.
end preprocess
2024-12-07 17:28:29 | INFO | __main__ | start preprocess
['infer/modules/train/preprocess.py', 'Z:\\RVC1006Nvidia\\runmusic\\ottoxunlian', '40000', '8', 'Z:\\RVC1006Nvidia/logs/otto', 'False', '3.7']
Z:\RVC1006Nvidia\runmusic\ottoxunlian/ottoxunlian.wav->Suc.
end preprocess

@nnjuntr nnjuntr closed this as completed Dec 7, 2024
@nnjuntr nnjuntr reopened this Dec 7, 2024
@StoneChin
Copy link

@nnjuntr It seems like the program has no error and run preprocess successful.
看起来程序正常运行了预处理程序并没有报错呀~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants