w-okada / voice-changer

リアルタイムボイスチェンジャー Realtime Voice Changer
Other
16.42k stars 1.8k forks source link

IndexError: index -1 is out of bounds for axis 0 with size 0 #287

Closed HidekoHaruna closed 1 year ago

HidekoHaruna commented 1 year ago

Every time I make a sound with the voice changer on I see these errors:

VC PROCESSING!!!! EXCEPTION!!! index -1 is out of bounds for axis 0 with size 0
Traceback (most recent call last):
  File "voice_changer\VoiceChanger.py", line 467, in on_request_sola
  File "voice_changer\RVC\RVC.py", line 357, in inference
  File "voice_changer\RVC\pipeline\Pipeline.py", line 157, in exec
IndexError: index -1 is out of bounds for axis 0 with size 0

No sound is being generated due to this.

w-okada commented 1 year ago

I think the microphone input must have failed. Try creating a wav file and entering it in the input. If it converts successfully, then the microphone input has failed.

HidekoHaruna commented 1 year ago

I think the microphone input must have failed. Try creating a wav file and entering it in the input. If it converts successfully, then the microphone input has failed.

I tried using a wav file, same thing happened. I also tried using multiple other vc versions and none of them worked.

HidekoHaruna commented 1 year ago

I also got this error when loading the model:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi
  File "uvicorn\middleware\proxy_headers.py", line 78, in __call__
  File "engineio\async_drivers\asgi.py", line 67, in __call__
  File "fastapi\applications.py", line 270, in __call__
  File "starlette\applications.py", line 124, in __call__
  File "starlette\middleware\errors.py", line 184, in __call__
  File "starlette\middleware\errors.py", line 162, in __call__
  File "starlette\middleware\cors.py", line 92, in __call__
  File "starlette\middleware\cors.py", line 147, in simple_response
  File "starlette\middleware\exceptions.py", line 79, in __call__
  File "starlette\middleware\exceptions.py", line 68, in __call__
  File "fastapi\middleware\asyncexitstack.py", line 21, in __call__
  File "fastapi\middleware\asyncexitstack.py", line 18, in __call__
  File "starlette\routing.py", line 706, in __call__
  File "starlette\routing.py", line 276, in handle
  File "starlette\routing.py", line 66, in app
  File "fastapi\routing.py", line 235, in app
  File "fastapi\routing.py", line 163, in run_endpoint_function
  File "starlette\concurrency.py", line 41, in run_in_threadpool
  File "anyio\to_thread.py", line 31, in run_sync
  File "anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
  File "anyio\_backends\_asyncio.py", line 867, in run
  File "restapi\MMVC_Rest_Fileuploader.py", line 73, in post_update_settings
  File "voice_changer\VoiceChangerManager.py", line 45, in update_settings
  File "voice_changer\VoiceChanger.py", line 339, in update_settings
  File "voice_changer\RVC\RVC.py", line 208, in update_settings
  File "voice_changer\RVC\RVC.py", line 237, in prepareModel
  File "voice_changer\RVC\pipeline\PipelineGenerator.py", line 52, in createPipeline
UnboundLocalError: local variable 'embedder' referenced before assignment
HidekoHaruna commented 1 year ago

It turns out there's something wrong with my model. I'm not sure why though as it does work in colab

w-okada commented 1 year ago

Is there any other errors in the log? Showing me the whole log might help me figure out the reason.

w-okada commented 1 year ago

no res close

PepsiMaster420 commented 1 year ago

I get the same error when selecting a microphone as input. If I select None it seems to work with res(ms) getting a value. But when I select a microphone res(ms) remains zero (or whatever is was before) and I get a very similar error-message:

[Voice Changer] VC PROCESSING EXCEPTION!!! index -1 is out of bounds for axis 0 with size 0
Traceback (most recent call last):
  File "voice_changer\VoiceChanger.py", line 472, in on_request_sola
  File "voice_changer\RVC\RVC.py", line 374, in inference
  File "voice_changer\RVC\pipeline\Pipeline.py", line 164, in exec
IndexError: index -1 is out of bounds for axis 0 with size 0

Using a file as input results in the same error. When pausing the file playback the errors stop, and res(ms) seems to be getting a value too, but when starting playback it is the same as with the microphone. For some reason, after clicking some button and changing values, and after a pop up came up saying "エラーが频発しています。対象としているフレームワークのモデルがロードされているか确认してください。", the error did vanish and res(ms) was getting values, but it did not output any sound. The recording button returned a silent wav file. I tried to recreate this behavior by restarting the program but I couldn't.

ajaxxxxxxx commented 1 year ago

I'm just now getting this error out of nowhere. Literally changed nothing but switched models back and fourth, now can't use a model I used originally without this error. ???

edit: This error seems to only show up on one specific model I used previously, when turning index from 0 to 1. Any value above 0 yields same error.