BenAAndrew / Voice-Cloning-App

A Python/Pytorch app for easily synthesising human voices
BSD 3-Clause "New" or "Revised" License
1.4k stars 233 forks source link

"IndexError: index 148 is out of bounds for dimension 0 with size 148" #174

Open DaltonScar opened 1 year ago

DaltonScar commented 1 year ago
Exception in thread Thread-155:
Traceback (most recent call last):
  File "C:\Users\Devil\.conda\envs\AiVoiceClone\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\Devil\.conda\envs\AiVoiceClone\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\AiShare\Voice-Cloning-App-main\application\utils.py", line 66, in background_task
    raise e
  File "C:\AiShare\Voice-Cloning-App-main\application\utils.py", line 62, in background_task
    func(logging=logger, **kwargs)
  File "C:\AiShare\Voice-Cloning-App-main\training\train.py", line 184, in train
    model = warm_start_model(transfer_learning_path, model, symbols)
  File "C:\AiShare\Voice-Cloning-App-main\training\checkpoint.py", line 150, in warm_start_model
    transfer_symbols_embedding(
  File "C:\AiShare\Voice-Cloning-App-main\training\checkpoint.py", line 106, in transfer_symbols_embedding
    embedding_layer.weight.data[symbol_index] = weight_tensor[0].clone().normal_(original_mean, original_std)
IndexError: index 148 is out of bounds for dimension 0 with size 148

This is the current error I am getting. I understand why the index is out of range but I am not sure what is causing this or where to find it. From what I read of other issues that people have and might be similar, is that could have something to do with the dataset I had the app generate. The WAV folder and metadata look fine as far as I can tell. It seems to be have some issue with the checkpoint process? I looked through checkpoint.py but was not able to find or I guess understand exactly where this issue is coming from. Any help with this would be greatly appreciated.

If am I doing something dumb, please tell me lol

ziyaad30 commented 1 year ago

If I am correct your using a new alphabet. Search for n_symbols, I changed mine and which had more characters.

Now mine is: n_symbols=178,

I believe it's the number of characters or count of symbols + 1 but check that.

DaltonScar commented 1 year ago

If I am correct your using a new alphabet. Search for n_symbols, I changed mine and which had more characters. Now mine is: n_symbols=178, I believe it's the number of characters or count of symbols + 1 but check that.

What file did you find that line in? is it the checkpoints.py?

ziyaad30 commented 1 year ago

If I am correct your using a new alphabet. Search for n_symbols, I changed mine and which had more characters. Now mine is: n_symbols=178, I believe it's the number of characters or count of symbols + 1 but check that.

What file did you find that line in? is it the checkpoints.py?

I think it's model.py - https://github.com/BenAAndrew/Voice-Cloning-App/blob/9cec6982aae6fa77ec0ecb301de87550c6a6797b/training/tacotron2_model/model.py#L509