Retrieval-based-Voice-Conversion-WebUI: AttributeError: 'NoneType' object has no attribute 'dtype'

  File "D:\Lab\aivoice\RVC-beta-v2-0528\infer-web.py", line 184, in vc_single
    audio_opt = vc.pipeline(
  File "D:\Lab\aivoice\RVC-beta-v2-0528\vc_infer_pipeline.py", line 347, in pipeline
    self.vc(
  File "D:\Lab\aivoice\RVC-beta-v2-0528\vc_infer_pipeline.py", line 201, in vc
    score, ix = index.search(npy, k=8)
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\faiss\__init__.py", line 341, in replacement_search
    assert d == self.d
AssertionError

Traceback (most recent call last):
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\routes.py", line 321, in run_predict
    output = await app.blocks.process_api(
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\blocks.py", line 1007, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\blocks.py", line 953, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\components.py", line 2076, in postprocess
    processing_utils.audio_to_file(sample_rate, data, file.name)
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\processing_utils.py", line 206, in audio_to_file
    data = convert_to_16_bit_wav(data)
  File "D:\Lab\aivoice\RVC-beta-v2-0528\runtime\lib\site-packages\gradio\processing_utils.py", line 219, in convert_to_16_bit_wav
    if data.dtype in [np.float64, np.float32, np.float16]:
AttributeError: 'NoneType' object has no attribute 'dtype' ```

OS: Window 11
GPU: NVIDIA RTX 3060

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/a02019e4284daa7b8ed253ff450fdc7d534fa735/vc_infer_pipeline.py#L227

The reason that setting to 0.5 fixed the issue is because pitchf is None and if protect is 0.5, the code is skipped 0.5可以修复这个问题的原因是因为出错的时候pitchfNone,然后如果protect设为0.5,就不会跑出错的代码

What caused pitchf to be None? @RVC-Boss 请问大佬,pitchf在什么情况下会是None

1、模型和索引的v1v2混用了 2、pip install torchcrepe==0.0.19再试试,不行就0.0.18,用runtime\Scipts\pip.exe装