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

Open
opened 2026-10-20 10:08:13 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @Karos44 on GitHub (Apr 19, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1981

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?

Originally created by @Karos44 on GitHub (Apr 19, 2024). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1981 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?
Author
Owner

@oyouchano commented on GitHub (Apr 19, 2024):

same here

<!-- gh-comment-id:2067077826 --> @oyouchano commented on GitHub (Apr 19, 2024): same here
Author
Owner

@oyouchano commented on GitHub (Apr 19, 2024):

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

<!-- gh-comment-id:2067110856 --> @oyouchano commented on GitHub (Apr 19, 2024): @Karos44 I fixed this by here https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1108#issuecomment-1694763737
Author
Owner

@Karos44 commented on GitHub (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...

<!-- gh-comment-id:2067500594 --> @Karos44 commented on GitHub (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...
Author
Owner

@oyouchano commented on GitHub (Apr 21, 2024):

@Karos44

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

Try this!

<!-- gh-comment-id:2068125508 --> @oyouchano commented on GitHub (Apr 21, 2024): @Karos44 ``` chmod +x tools/dlmodels.sh ./tools/dlmodels.sh ``` Try this!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#1340
No description provided.