For some reason, preprocess.py works and compiles all the samples, which are .WAV and at 22.05kHz. However, when I run train_tacotron.py, it suddenly does not work.
Here is the output of the file:
Traceback(most recent call last):
File "train_tacotron.py", line 202, in
main()
File "train_tacotron.py", line 98, in main
tts_train_loop(paths, model, optimizer, train_set, lr, training_steps, attn_example)
File "train_tacotron.py", line 126, in tts_trainloop
for i, (x, m, ids, ) in enumerate(train_set, 1):
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
return self._process_data(data)
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
data.reraise()
File "/home/me/.local/lib/python3.8/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
data = fetcher.fetch(index)
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/me/Downloads/WaveRNN-master/utils/dataset.py", line 149, in getitem
x = text_to_sequence(self.text_dict[item_id], hp.tts_cleaner_names)
KeyError: 'unusual05'
Note that "usual05" is a name of one of the samples. Everytime I run train_tacotron.py, it picks a different sample each time. I made sure to double check that the delimiter was set to "|".
Adding a print(self.text_dict) line in the dataset.py file showed that the dataset was being formatted as ('"unusual05': 'This is very unusual"\n',)
For some reason, preprocess.py works and compiles all the samples, which are .WAV and at 22.05kHz. However, when I run train_tacotron.py, it suddenly does not work.
Here is the output of the file:
Traceback(most recent call last): File "train_tacotron.py", line 202, in
main()
File "train_tacotron.py", line 98, in main
tts_train_loop(paths, model, optimizer, train_set, lr, training_steps, attn_example)
File "train_tacotron.py", line 126, in tts_trainloop
for i, (x, m, ids, ) in enumerate(train_set, 1):
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
return self._process_data(data)
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
data.reraise()
File "/home/me/.local/lib/python3.8/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
data = fetcher.fetch(index)
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/me/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/me/Downloads/WaveRNN-master/utils/dataset.py", line 149, in getitem
x = text_to_sequence(self.text_dict[item_id], hp.tts_cleaner_names)
KeyError: 'unusual05'
Note that "usual05" is a name of one of the samples. Everytime I run train_tacotron.py, it picks a different sample each time. I made sure to double check that the delimiter was set to "|".
Adding a print(self.text_dict) line in the dataset.py file showed that the dataset was being formatted as ('"unusual05': 'This is very unusual"\n',)
Any solutions or help would be very appreciated!