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

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

MacOS m1, Training successful, audio conversion output error(训练成功,音频转换输出错误) #1981

Open Karos44 opened 1 month ago

Karos44 commented 1 month ago

I had no problems during training, and successfully found the model I wanted in the timbre options. However, when I selected the output audio, the following error occurred(我在训练中没有出现问题,也成功的在音色选项中找到了我要的模型,然而选择输出音频时出现了以下报错):

DEBUG:matplotlib.pyplot:Loaded backend macosx version unknown.
DEBUG:matplotlib.pyplot:Loaded backend agg version v2.2.
INFO:infer.modules.vc.modules:Get sid: Male-1.pth
INFO:infer.modules.vc.modules:Loading: assets/weights/Male-1.pth
DEBUG:infer.lib.infer_pack.models:gin_channels: 256, self.spk_embed_dim: 109
INFO:infer.modules.vc.modules:Select index: 
DEBUG:matplotlib.pyplot:Loaded backend MacOSX version unknown.
DEBUG:matplotlib.pyplot:Loaded backend agg version v2.2.
WARNING:infer.modules.vc.modules:Traceback (most recent call last):
  File "/Users/eden/Retrieval-based-Voice-Conversion-WebUI/infer/lib/audio.py", line 38, in load_audio
    ffmpeg.input(file, threads=0)
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/ffmpeg/_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/eden/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 165, in vc_single
    audio = load_audio(input_audio_path, 16000)
  File "/Users/eden/Retrieval-based-Voice-Conversion-WebUI/infer/lib/audio.py", line 43, in load_audio
    raise RuntimeError(f"Failed to load audio: {e}")
RuntimeError: Failed to load audio: ffmpeg error (see stderr output for detail)

DEBUG:matplotlib.pyplot:Loaded backend MacOSX version unknown.
Traceback (most recent call last):
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/queueing.py", line 501, in call_prediction
    output = await route_utils.call_process_api(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/route_utils.py", line 258, in call_process_api
    output = await app.get_blocks().process_api(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/blocks.py", line 1693, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/blocks.py", line 1535, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/components/audio.py", line 263, in postprocess
    file_path = processing_utils.save_audio_to_cache(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/processing_utils.py", line 167, in save_audio_to_cache
    temp_dir = Path(cache_dir) / hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'

What should I do?

oyouchano commented 1 month ago

same here

oyouchano commented 1 month ago

@Karos44 I fixed this by here https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1108#issuecomment-1694763737

Karos44 commented 1 month ago

no ffmpeg errors, but some other errors appear? @oyouchano

DEBUG:matplotlib.pyplot:Loaded backend agg version v2.2.
WARNING:infer.modules.vc.modules:Traceback (most recent call last):
  File "/Users/eden/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 172, in vc_single
    self.hubert_model = load_hubert(self.config)
  File "/Users/eden/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/utils.py", line 23, in load_hubert
    models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/fairseq/checkpoint_utils.py", line 430, in load_model_ensemble_and_task
    raise IOError("Model file not found: {}".format(filename))
OSError: Model file not found: assets/hubert/hubert_base.pt

DEBUG:matplotlib.pyplot:Loaded backend MacOSX version unknown.
Traceback (most recent call last):
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/queueing.py", line 501, in call_prediction
    output = await route_utils.call_process_api(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/route_utils.py", line 258, in call_process_api
    output = await app.get_blocks().process_api(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/blocks.py", line 1693, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/blocks.py", line 1535, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/components/audio.py", line 263, in postprocess
    file_path = processing_utils.save_audio_to_cache(
  File "/Users/eden/.pyenv/versions/3.9.2/lib/python3.9/site-packages/gradio/processing_utils.py", line 167, in save_audio_to_cache
    temp_dir = Path(cache_dir) / hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'

I cant found hubert_base.pt even if in the github page assets/hubert; and I redownloaded gradio but nothing works. Help...

oyouchano commented 1 month ago

@Karos44

chmod +x tools/dlmodels.sh
./tools/dlmodels.sh

Try this!