voicepaw / so-vits-svc-fork

so-vits-svc fork with realtime support, improved interface and more features.
Other
8.77k stars 1.18k forks source link

How do I fix "KeyError: 'index' (trying to open GUI)? #497

Open KatieBelli opened 1 year ago

KatieBelli commented 1 year ago

I installed it manually and through the .bat file. After, it opened the GUI. When I want to open it with svcg-command, this appears:

C:\Users...>svcg [17:23:09] INFO [17:23:09] version: 3.11.0 gui.py:144 Traceback (most recent call last): File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users...\AppData\Local\Programs\Python\Python39\Scripts\svcg.exe__main__.py", line 7, in File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\site-packages\so_vits_svc_fork\gui.py", line 554, in main update_devices() File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\site-packages\so_vits_svc_fork\gui.py", line 512, in update_devices ) = get_devices() File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\site-packages\so_vits_svc_fork\gui.py", line 125, in get_devices input_devices_indices = [d["index"] for d in devices if d["max_input_channels"] > 0] File "C:\Users...\AppData\Local\Programs\Python\Python39\lib\site-packages\so_vits_svc_fork\gui.py", line 125, in input_devices_indices = [d["index"] for d in devices if d["max_input_channels"] > 0] KeyError: 'index'

kelseyjd commented 1 year ago

I have the same error

zsdfaker commented 1 year ago

I debug the code and found that there is no key "index" in the corresponding dict. I changed the "index" directly to the "name" code and it can be run. So far, no problem has been found.