PlayVoice / whisper-vits-svc

Core Engine of Singing Voice Conversion & Singing Voice Clone
https://huggingface.co/spaces/maxmax20160403/sovits5.0
MIT License
2.6k stars 919 forks source link

Issue while running prepare/preprocess_crepe.py file. #91

Open R0jER5 opened 1 year ago

R0jER5 commented 1 year ago

As i am following the instruction to setup the clonning agent. I am stuck at this point:

python prepare/preprocess_crepe.py -w data_svc/waves-16k/ -p data_svc/pitch

First i got "RuntimeError: context has already been set" in set_start_method('spawn') line.

But solved it with set_start_method('spawn', force= True)

but now process starts but stuck in between and gives the following error.

Traceback (most recent call last): File "/usr/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/root/ai_chat_bot/voice_clonning/so-vits-svc-5.0/prepare/preprocess_crepe.py", line 50, in process_file compute_f0(f"{wavPath}/{spks}/{file}.wav", f"{pitPath}/{spks}/{file}.pit", device) File "/root/ai_chat_bot/voice_clonning/so-vits-svc-5.0/prepare/preprocess_crepe.py", line 41, in compute_f0 periodicity = crepe.filter.median(periodicity, 7) File "/root/ai_chat_bot/voice_clonning/so-vits-svc-5.0/crepe/filter.py", line 79, in median x = F.pad(masked_x, (padding, padding), mode="reflect") RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (3, 3) at dimension 2 of input [1, 1, 1] """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "prepare/preprocess_crepe.py", line 86, in process_files_with_process_pool(wavPath, spks, pitPath, device, process_num) File "prepare/preprocess_crepe.py", line 59, in process_files_with_process_pool future.result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.get_result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in get_result raise self._exception RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (3, 3) at dimension 2 of input [1, 1, 1]

Can you help me with this?

MaxMax2016 commented 1 year ago

https://github.com/pytorch/pytorch/issues/18413 maybe one of your audio is too short or empty.

R0jER5 commented 1 year ago

Thank you for the reply.

I have one small suggestion, when you have more than 1000 audio files if is not possible to go there and check every file. Isn't it better option to just ignore the audio files with the issue like following:

in prepare/preprocess_crepe.py file, Insted of compute_f0(f"{wavPath}/{spks}/{file}.wav", f"{pitPath}/{spks}/{file}.pit", device) use

try: compute_f0(f"{wavPath}/{spks}/{file}.wav", f"{pitPath}/{spks}/{file}.pit", device) except: pass

MaxMax2016 commented 1 year ago

good suggestion