Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error opening 'C:/Users/Alex/Desktop/outpoutname.mp3': System error. #902

Open
2 tasks done
alexandrecoulay opened this issue Aug 20, 2023 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@alexandrecoulay
Copy link

alexandrecoulay commented Aug 20, 2023

Describe the bug

I have this error [23:14:21] Error opening 'C:/Users/Alex/Desktop/bliat.mp3': System error when I want to infer the audio.

Full error :

[23:19:06] INFO     [23:19:06] version: 4.1.1                                                                                                                                                                                     gui.py:161
[23:19:14] INFO     [23:19:14] Event input_path, values {'model_path': 'C:/AI/logs/44k/G_0.pth', 'model_path_browse': '', 'config_path': 'C:/AI/configs/44k/config.json', 'config_path_browse': '', 'cluster_model_path': '',     gui.py:665
                    'cluster_model_path_browse': '', 'speaker': 'nerd', 'silence_threshold': -35.0, 'transpose': 12.0, 'auto_predict_f0': False, 'f0_method': 'dio', 'cluster_infer_ratio': 0.0, 'noise_scale': 0.4,
                    'pad_seconds': 0.1, 'chunk_seconds': 0.5, 'max_chunk_seconds': 40.0, 'absolute_thresh': True, 'input_path': 'C:/Users/Alex/Desktop/Cyka.mp3', 'input_path_browse': 'C:/Users/Alex/Desktop/Cyka.mp3',
                    'input_path_folder_browse': '', 'output_path': '', 'output_path_browse': '', 'auto_play': True, 'crossfade_seconds': 0.05, 'block_seconds': 0.35, 'additional_infer_before_seconds': 0.15,
                    'additional_infer_after_seconds': 0.1, 'realtime_algorithm': '1 (Divide constantly)', 'input_device': 'Chat Mic (2- TC-Helicon GoXLR) (MME)', 'output_device': 'System (2- TC-Helicon GoXLR) (MME)',
                    'passthrough_original': False, 'presets': 'Default VC (GPU, GTX 1060)', 'preset_name': '', 'use_gpu': True}
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E12667B80> to C:\Users\Alex\Desktop                                                                                            gui.py:671
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E126A1120> to C:\Users\Alex\Desktop                                                                                            gui.py:671
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E126A02E0> to C:\Users\Alex\Desktop                                                                                            gui.py:671
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E126A1360> to C:\Users\Alex\Desktop                                                                                            gui.py:671
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E126A13C0> to C:\Users\Alex\Desktop                                                                                            gui.py:671
           INFO     [23:19:14] Updating browser <PySimpleGUI.PySimpleGUI.Button object at 0x0000015E126A1600> to C:\Users\Alex\Desktop                                                                                            gui.py:671
[23:19:15] INFO     [23:19:15] Event infer, values {'model_path': 'C:/AI/logs/44k/G_0.pth', 'model_path_browse': '', 'config_path': 'C:/AI/configs/44k/config.json', 'config_path_browse': '', 'cluster_model_path': '',          gui.py:665
                    'cluster_model_path_browse': '', 'speaker': 'nerd', 'silence_threshold': -35.0, 'transpose': 12.0, 'auto_predict_f0': False, 'f0_method': 'dio', 'cluster_infer_ratio': 0.0, 'noise_scale': 0.4,
                    'pad_seconds': 0.1, 'chunk_seconds': 0.5, 'max_chunk_seconds': 40.0, 'absolute_thresh': True, 'input_path': 'C:/Users/Alex/Desktop/Cyka.mp3', 'input_path_browse': 'C:/Users/Alex/Desktop/Cyka.mp3',
                    'input_path_folder_browse': '', 'output_path': 'C:\\Users\\Alex\\Desktop\\Cyka.out.mp3', 'output_path_browse': '', 'auto_play': True, 'crossfade_seconds': 0.05, 'block_seconds': 0.35,
                    'additional_infer_before_seconds': 0.15, 'additional_infer_after_seconds': 0.1, 'realtime_algorithm': '1 (Divide constantly)', 'input_device': 'Chat Mic (2- TC-Helicon GoXLR) (MME)', 'output_device':
                    'System (2- TC-Helicon GoXLR) (MME)', 'passthrough_original': False, 'presets': 'Default VC (GPU, GTX 1060)', 'preset_name': '', 'use_gpu': True}
[23:19:16] INFO     [23:19:16] Starting inference...                                                                                                                                                                              gui.py:725
[23:19:20] WARNING  [23:19:20] C:\AI\venv\lib\site-packages\so_vits_svc_fork\modules\synthesizers.py:81: UserWarning: Unused arguments: {'n_layers_q': 3, 'use_spectral_norm': False, 'pretrained': {'D_0.pth':               warnings.py:109
                    'https://huggingface.co/datasets/ms903/sovits4.0-768vec-layer12/resolve/main/sovits_768l12_pre_large_320k/clean_D_320000.pth', 'G_0.pth':
                    'https://huggingface.co/datasets/ms903/sovits4.0-768vec-layer12/resolve/main/sovits_768l12_pre_large_320k/clean_G_320000.pth'}}
                      warnings.warn(f"Unused arguments: {kwargs}")

           INFO     [23:19:20] Decoder type: hifi-gan                                                                                                                                                                     synthesizers.py:100
[23:19:21] INFO     [23:19:21] Finished inference for Cyka.mp3                                                                                                                                                                    gui.py:151
           ERROR    [23:19:21] Error opening 'C:/Users/Alex/Desktop/Cyka.out.mp3': System error.                                                                                                                                  gui.py:157
                    Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 155, in after_inference
                        play_audio(output_path)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 28, in play_audio
                        data, sr = sf.read(path)
                      File "C:\AI\venv\lib\site-packages\soundfile.py", line 285, in read
                        with SoundFile(file, 'r', samplerate, channels,
                      File "C:\AI\venv\lib\site-packages\soundfile.py", line 658, in __init__
                        self._file = self._open(file, mode_int, closefd)
                      File "C:\AI\venv\lib\site-packages\soundfile.py", line 1216, in _open
                        raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
                    soundfile.LibsndfileError: Error opening 'C:/Users/Alex/Desktop/Cyka.out.mp3': System error.
           ERROR    [23:19:21] Error in realtime:                                                                                                                                                                                 gui.py:838
           ERROR    [23:19:21] PytorchStreamReader failed reading zip archive: failed finding central directory                                                                                                                   gui.py:839
                    pebble.common.RemoteTraceback: Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\pebble\common.py", line 174, in process_execute
                        return function(*args, **kwargs)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\main.py", line 75, in infer
                        svc_model = Svc(
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 126, in __init__
                        self.load_model()
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 136, in load_model
                        _ = utils.load_checkpoint(self.net_g_path, self.net_g, None)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\utils.py", line 288, in load_checkpoint
                        checkpoint_dict = torch.load(f, map_location="cpu", weights_only=True)
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 797, in load
                        with _open_zipfile_reader(opened_file) as opened_zipfile:
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 283, in __init__
                        super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory


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

                    Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 836, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
           ERROR    [23:19:21] Error in inference:                                                                                                                                                                                gui.py:846
           ERROR    [23:19:21] PytorchStreamReader failed reading zip archive: failed finding central directory                                                                                                                   gui.py:847
                    pebble.common.RemoteTraceback: Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\pebble\common.py", line 174, in process_execute
                        return function(*args, **kwargs)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\main.py", line 75, in infer
                        svc_model = Svc(
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 126, in __init__
                        self.load_model()
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 136, in load_model
                        _ = utils.load_checkpoint(self.net_g_path, self.net_g, None)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\utils.py", line 288, in load_checkpoint
                        checkpoint_dict = torch.load(f, map_location="cpu", weights_only=True)
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 797, in load
                        with _open_zipfile_reader(opened_file) as opened_zipfile:
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 283, in __init__
                        super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory


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

                    Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 844, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 836, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
           ERROR    [23:19:21] Error in realtime:                                                                                                                                                                                 gui.py:838
           ERROR    [23:19:21] PytorchStreamReader failed reading zip archive: failed finding central directory                                                                                                                   gui.py:839
                    pebble.common.RemoteTraceback: Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\pebble\common.py", line 174, in process_execute
                        return function(*args, **kwargs)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\main.py", line 75, in infer
                        svc_model = Svc(
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 126, in __init__
                        self.load_model()
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\inference\core.py", line 136, in load_model
                        _ = utils.load_checkpoint(self.net_g_path, self.net_g, None)
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\utils.py", line 288, in load_checkpoint
                        checkpoint_dict = torch.load(f, map_location="cpu", weights_only=True)
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 797, in load
                        with _open_zipfile_reader(opened_file) as opened_zipfile:
                      File "C:\AI\venv\lib\site-packages\torch\serialization.py", line 283, in __init__
                        super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory


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

                    Traceback (most recent call last):
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 836, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 844, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                      File "C:\AI\venv\lib\site-packages\so_vits_svc_fork\gui.py", line 836, in main
                        future.result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\Alex\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                    RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

To Reproduce

Open via Command in Admin (system32) : svcg
And do this config :
image

Additional context

I created my own model with my own voice

Version

4.1.1

Platform

Windows 11

Code of Conduct

  • I agree to follow this project's Code of Conduct.

No Duplicate

  • I have checked existing issues to avoid duplicates.
@alexandrecoulay alexandrecoulay added the bug Something isn't working label Aug 20, 2023
@3058132083
Copy link

The same problem

@34j
Copy link
Collaborator

34j commented Aug 30, 2023

Dup #198 #464 #688

@TheAwesomeGem
Copy link

Same issue

@quyaoning
Copy link

try converting your mp3 to .wav/.flac, as sounfile library only support these file types.

@realfrimaire
Copy link

realfrimaire commented Mar 23, 2024

I've just experienced a similar issue, and now I can tell you what the solution is: simply disable the auto play of the output on SVCG, and the error won't occur anymore. The reason for this problem is that SVC encounters interruptions in inference due to other reasons, and SVC fails to catch the exceptions at all. After resolving this issue, you'll also need to investigate its root cause to eliminate the problem of being unable to generate the 'out' file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants