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

Step 7 RuntimeError: File xxxxxx.pt cannot be opened #72

Closed zzpop closed 1 year ago

zzpop commented 1 year ago

Step 7 : python prepare/preprocess_spec.py -w data_svc/waves-32k/ -s data_svc/specs -t 0 RuntimeError: File xxxxxx.pt cannot be opened

PS C:\Users\Administrator\Downloads\so-vits-svc-5.0-bigvgan-mix-v2> python prepare/preprocess_spec.py -w data_svc/waves-32k/ -s data_svc/specs -t 0 data_svc/waves-32k/ data_svc/specs C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\functional.py:641: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ..\aten\src\ATen\native\SpectralOps.cpp:867.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] 0%| | 0/915 [00:00<?, ?it/s] Traceback (most recent call last): File "C:\Users\Administrator\Downloads\so-vits-svc-5.0-bigvgan-mix-v2\prepare\preprocess_spec.py", line 61, in process_files_with_thread_pool(wavPath, spks, process_num) File "C:\Users\Administrator\Downloads\so-vits-svc-5.0-bigvgan-mix-v2\prepare\preprocess_spec.py", line 36, in process_files_with_thread_pool list(tqdm(executor.map(process_file, files), total=len(files))) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\tqdm\std.py", line 1178, in iter for obj in iterable: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 621, in result_iterator yield _result_or_cancel(fs.pop()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 319, in _result_or_cancel return fut.result(timeout) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 458, in result return self.get_result() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 403, in get_result raise self._exception File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\Administrator\Downloads\so-vits-svc-5.0-bigvgan-mix-v2\prepare\preprocess_spec.py", line 31, in process_file compute_spec(hps.data, f"{wavPath}/{spks}/{file}.wav", f"{spePath}/{spks}/{file}.pt") File "C:\Users\Administrator\Downloads\so-vits-svc-5.0-bigvgan-mix-v2\prepare\preprocess_spec.py", line 25, in compute_spec torch.save(spec, specname) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 440, in save with _open_zipfile_writer(f) as opened_zipfile: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 315, in _open_zipfile_writer return container(name_or_buffer) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 288, in init super().init(torch._C.PyTorchFileWriter(str(name))) RuntimeError: File data_svc/specs/123/101- (Vocals)_1.pt cannot be opened.

zzpop commented 1 year ago

疑似是因为文件名里有空格或特殊字符导致报错,重命名后解决。疑似是torch.save()方法的问题