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

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

AttributeError: 'NoneType' object has no attribute 'tobytes' #1054

Open kenil261615 opened 1 year ago

kenil261615 commented 1 year ago

Found GPU NVIDIA GeForce GTX 1650 Ti , force to fp32 Use Language: en_US Running on local URL: http://0.0.0.0:7879 loading weights/arijit.pth gin_channels: 256 self.spk_embed_dim: 109

Traceback (most recent call last): File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\lib\audio.py", line 14, in load_audio ffmpeg.input(file, threads=0) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 313, in run process = run_async( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 284, in run_async return subprocess.Popen( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\infer-web.py", line 188, in vc_single audio = load_audio(input_audio_path, 16000) File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\lib\audio.py", line 19, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: [WinError 2] The system cannot find the file specified Traceback (most recent call last): File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\blocks.py", line 1434, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\blocks.py", line 1341, in postprocess_data prediction_value = block.postprocess(prediction_value) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\components\audio.py", line 345, in postprocess file_path = self.audio_to_temp_file( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\components\base.py", line 325, in audio_to_temp_file temp_dir = Path(self.DEFAULT_TEMP_DIR) / self.hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes'
Volt24 commented 1 year ago

Found GPU NVIDIA GeForce GTX 1650 Ti , force to fp32 Use Language: en_US Running on local URL: http://0.0.0.0:7879 loading weights/arijit.pth gin_channels: 256 self.spk_embed_dim: 109 Traceback (most recent call last): File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\lib\audio.py", line 14, in load_audio ffmpeg.input(file, threads=0) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg_run.py", line 313, in run process = run_async( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg_run.py", line 284, in run_async return subprocess.Popen( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\infer-web.py", line 188, in vc_single audio = load_audio(input_audio_path, 16000) File "C:\Users\HP\Downloads\AI\Retrieval-based-Voice-Conversion-WebUI\lib\audio.py", line 19, in load_audio raise RuntimeError(f"Failed to load audio: {e}") RuntimeError: Failed to load audio: [WinError 2] The system cannot find the file specified

Traceback (most recent call last): File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\blocks.py", line 1434, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\blocks.py", line 1341, in postprocess_data prediction_value = block.postprocess(prediction_value) File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\components\audio.py", line 345, in postprocess file_path = self.audio_to_temp_file( File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\components\base.py", line 325, in audio_to_temp_file temp_dir = Path(self.DEFAULT_TEMP_DIR) / self.hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes'

Same error for me. Id appreciate any ideas :)

RVC-Boss commented 1 year ago

You input a wrong audio path.

Volt24 commented 1 year ago

pip install --upgrade --no-deps --force-reinstall torchcrepe

Fixed it for me

fuomag9 commented 1 year ago

You input a wrong audio path.

That is not the case, my path is correct unfortunately. The fix proposed by @Volt24 did not work for me :(

Brhernann commented 11 months ago

You input a wrong audio path.

i believe this but which one should be the correct path ?

govo commented 9 months ago

For me, reinstalling the whole package fixed.

shaungao94 commented 4 months ago

Move the rmvpe.pt to the asset/rmvpe/rmvpe.pt fixed my issue. The guide in the README was quite miss leading. Don't put rmvpe.pt in the root folder.

Gajaharish commented 4 months ago

I'm also having the same. I'm using the portable version of rvc. I have solved another problem before this but I can't figure this out.

Previously I had ' attributeerror none type object has no attribute 'dtype' '. I installed the required packages local python in my os then I copied gradio and other packs from my local python directory to the library folder in the runtime folder. 'Dtype ' error was fixed. But I'm getting this error now.

Gajaharish commented 4 months ago

For me, reinstalling the whole package fixed.

If so do we have to update packs?

Gajaharish commented 4 months ago

I can clone my voice to a small song( hardly 10sec). If I clone my voice to a 4-5 minute , it gives error.

Gajaharish commented 4 months ago

For a check Are you all using rvc with required system?

Gajaharish commented 4 months ago

I think when your memory is not enough to hold the entire audio file ,it attempts to write it in a file. In my case I am a iris xe graphics user I can clone a 5 sec file with out filling the vram. But the longer conversion fills my memory and gives error. Then why don't you guys trim the audio to a smaller size then try . GeForce GTX 1650 also have 4gb vram like me.