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

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

Open
Karos44 opened this issue Apr 19, 2024 · 4 comments
Labels
bug 🐛程序异常 stale 🪨话题搁置

Comments

@Karos44
Copy link

Karos44 commented Apr 19, 2024

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
Copy link

same here

@oyouchano
Copy link

@Karos44 I fixed this by here
#1108 (comment)

@Karos44
Copy link
Author

Karos44 commented Apr 20, 2024

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
Copy link

@Karos44

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

Try this!

@fumiama fumiama added the bug 🐛程序异常 label Apr 23, 2024
@github-actions github-actions bot added the stale 🪨话题搁置 label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛程序异常 stale 🪨话题搁置
Projects
None yet
Development

No branches or pull requests

3 participants