Error when generating voice #99

Closed
opened 2023-03-09 03:59:52 +00:00 by ThrowawayAccount01 · 5 comments

Getting this error when trying to generate voices:

C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning>call .\venv\Scripts\activate.bat
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Loading TorToiSe... (AR: ./models/finetunes//15150_gpt.pth, vocoder: bigvgan_24khz_100band)
Hardware acceleration found: cuda
Loading autoregressive model: ./models/finetunes//15150_gpt.pth
Loaded autoregressive model
bigvgan_24khz_100band
Loading vocoder model: bigvgan_24khz_100band.pth
Removing weight norm...
Loaded vocoder model
Loaded TorToiSe, ready for generation.
Traceback (most recent call last):
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 384, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1032, in process_api
    result = await self.call_function(
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 844, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 584, in tracked_fn
    response = fn(*args)
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\webui.py", line 90, in generate_proxy
    raise e
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\webui.py", line 84, in generate_proxy
    sample, outputs, stats = generate(**kwargs)
  File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\utils.py", line 224, in generate
    key = int(match[0])
IndexError: list index out of range
Getting this error when trying to generate voices: ``` C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning>call .\venv\Scripts\activate.bat Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Loading TorToiSe... (AR: ./models/finetunes//15150_gpt.pth, vocoder: bigvgan_24khz_100band) Hardware acceleration found: cuda Loading autoregressive model: ./models/finetunes//15150_gpt.pth Loaded autoregressive model bigvgan_24khz_100band Loading vocoder model: bigvgan_24khz_100band.pth Removing weight norm... Loaded vocoder model Loaded TorToiSe, ready for generation. Traceback (most recent call last): File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 384, in run_predict output = await app.get_blocks().process_api( File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1032, in process_api result = await self.call_function( File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 844, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 584, in tracked_fn response = fn(*args) File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\webui.py", line 90, in generate_proxy raise e File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\webui.py", line 84, in generate_proxy sample, outputs, stats = generate(**kwargs) File "C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning\src\utils.py", line 224, in generate key = int(match[0]) IndexError: list index out of range ```
Owner

Maybe remedied in 797882336b. I'm assuming you have a file that is neither a wav nor a json in your ./results/{voice}/ folder?

Maybe remedied in 797882336ba1956c544cdf6ebb9a27960610245f. I'm assuming you have a file that is neither a wav nor a json in your `./results/{voice}/` folder?

Works now. I didn't have any files in the results folder though, deleted them before generating. Also, voicefixer is still busted.

C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning>call .\venv\Scripts\activate.bat
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Loading TorToiSe... (AR: ./models/finetunes//15150_gpt.pth, vocoder: bigvgan_24khz_100band)
Hardware acceleration found: cuda
Loading autoregressive model: ./models/finetunes//15150_gpt.pth
Loaded autoregressive model
bigvgan_24khz_100band
Loading vocoder model: bigvgan_24khz_100band.pth
Removing weight norm...
Loaded vocoder model
Loaded TorToiSe, ready for generation.
[1/1] Generating line: This is a test message.
Loading voice: 21 with model b6689a97
Reading from latent: ./voices\21\cond_latents_b6689a97.pth
Generating autoregressive samples
Computing best candidates using CLVP
Transforming autoregressive outputs into audio..
Generating line took 20.30301785469055 seconds
Loading Voicefixer
Error occurred while tring to initialize voicefixer: pad_center() takes 1 positional argument but 2 were given
'NoneType' object has no attribute 'restore'

Failed to run Voicefixer
Generation took 20.780983686447144 seconds, saved to './results/21//21_00001.wav'
Works now. I didn't have any files in the results folder though, deleted them before generating. Also, voicefixer is still busted. ``` C:\Users\LXC PC\Desktop\mrqtts\ai-voice-cloning>call .\venv\Scripts\activate.bat Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Loading TorToiSe... (AR: ./models/finetunes//15150_gpt.pth, vocoder: bigvgan_24khz_100band) Hardware acceleration found: cuda Loading autoregressive model: ./models/finetunes//15150_gpt.pth Loaded autoregressive model bigvgan_24khz_100band Loading vocoder model: bigvgan_24khz_100band.pth Removing weight norm... Loaded vocoder model Loaded TorToiSe, ready for generation. [1/1] Generating line: This is a test message. Loading voice: 21 with model b6689a97 Reading from latent: ./voices\21\cond_latents_b6689a97.pth Generating autoregressive samples Computing best candidates using CLVP Transforming autoregressive outputs into audio.. Generating line took 20.30301785469055 seconds Loading Voicefixer Error occurred while tring to initialize voicefixer: pad_center() takes 1 positional argument but 2 were given 'NoneType' object has no attribute 'restore' Failed to run Voicefixer Generation took 20.780983686447144 seconds, saved to './results/21//21_00001.wav' ```
Owner

Right, I guess it makes sense to delete the voicefixer var if it fails, as it's evident it's doing it with:

Error occurred while tring to initialize voicefixer: pad_center() takes 1 positional argument but 2 were given

A cursory search in voicefixer's issues gave me https://github.com/haoheliu/voicefixer/issues/16 (another issue with librosa). I'm not too sure if it just requires uninstalling and reinstalling voicefixer.

It should be bandaided in commit a01eb10960, but it only just prevents it from throwing while loading voicefixer.

Right, I guess it makes sense to delete the voicefixer var if it fails, as it's evident it's doing it with: > Error occurred while tring to initialize voicefixer: pad_center() takes 1 positional argument but 2 were given A cursory search in voicefixer's issues gave me https://github.com/haoheliu/voicefixer/issues/16 (another issue with librosa). I'm not too sure if it just requires uninstalling and reinstalling voicefixer. It should be bandaided in commit a01eb10960c352584eb6d0a0d9adb4c28b163a2e, but it only just prevents it from throwing while loading voicefixer.
mrq closed this issue 2023-03-09 04:29:22 +00:00
Owner

Yeah, it requires a lower version librosa (I'd imagine whisperx is to blame, again). I'll add it to update-force.bat for the reinstall line, but you can run this yourself to fix it:

.\venv\Scripts\activate
pip install -U librosa==0.8.0
deactivate
Yeah, it requires a lower version librosa (I'd imagine whisperx is to blame, again). I'll add it to `update-force.bat` for the reinstall line, but you can run this yourself to fix it: ``` .\venv\Scripts\activate pip install -U librosa==0.8.0 deactivate ```

Aye, that worked for me. Thanks.

Aye, that worked for me. Thanks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#99
No description provided.