Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

Regarding these two problems, RuntimeError&AttributeError it has finally been solved.|关于RuntimeError和AttributeError: 'NoneType' object has no attribute 'dtype'这两个问题的。

Open Wuxlol opened this issue 1 year ago • 0 comments

loading weights/TEST02.pth gin_channels: 256 self.spk_embed_dim: 109 Traceback (most recent call last): File "G:\RVC-beta-v2-0618\my_utils.py", line 14, in load_audio ffmpeg.input(file, threads=0) File "G:\RVC-beta-v2-0618\runtime\lib\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 "G:\RVC-beta-v2-0618\infer-web.py", line 178, in vc_single audio = load_audio(input_audio_path, 16000) File "G:\RVC-beta-v2-0618\my_utils.py", line 19, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: ffmpeg error (see stderr output for detail)

Traceback (most recent call last): File "G:\RVC-beta-v2-0618\runtime\lib\site-packages\gradio\routes.py", line 321, in run_predict output = await app.blocks.process_api( File "G:\RVC-beta-v2-0618\runtime\lib\site-packages\gradio\blocks.py", line 1007, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "G:\RVC-beta-v2-0618\runtime\lib\site-packages\gradio\blocks.py", line 953, in postprocess_data prediction_value = block.postprocess(prediction_value) File "G:\RVC-beta-v2-0618\runtime\lib\site-packages\gradio\components.py", line 2076, in postprocess processing_utils.audio_to_file(sample_rate, data, file.name) File "G:\RVC-beta-v2-0618\runtime\lib\site-packages\gradio\processing_utils.py", line 206, in audio_to_file data = convert_to_16_bit_wav(data) File "G:\RVC-beta-v2-0618\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'


This problem confused me for a long time, I have no problem with the path at all, the training is normal, the reasoning always fails, and I didn't expect it to be really a path problem, because I really can't think of this error. I put the music file xxx .wav under the project directory, if you directly use the relative path "xxx.wav" it is normal, if you use the absolute path "G:RVC-beta-v2-0618xxx.wav" will report an error, the same file and path, because I have been looking for the answer for a long time, and I found that several people are asking this error.


这个问题让我困惑很久,我路径完全没有问题,训练正常,推理总是失败,我也没想到真的是路径问题,因为这个错误我真的想不到。 我把音乐文件xxx.wav放在项目目录下,如果直接用相对路径“xxx.wav”就正常,如果用绝对路径“G:\RVC-beta-v2-0618\xxx.wav”就会报错,相同的文件跟路径,因为找答案很久,发现好几个都在问这个错误。

Wuxlol avatar Jul 07 '23 04:07 Wuxlol