When running WaveRNN/notebooks/ExtractTTSprectrogram.ipynb I get an error in step 5:
AttributeError Traceback (most recent call last)
<ipython-input-18-af95a7293ea2> in <module>
11 # ]
12
---> 13 dataset = MyDataset(DATA_PATH, METADATA_FILE, C.r, C.text_cleaner, ap, preprocessor, use_phonemes=C.use_phonemes, phoneme_cache_path=C.phoneme_cache_path)
14 #dataset = MyDataset(C.r, C.text_cleaner, ap, metadata, use_phonemes=C.use_phonemes, phoneme_language=C.phoneme_language, phoneme_cache_path=C.phoneme_cache_path)
15 loader = DataLoader(dataset, batch_size=BATCH_SIZE, num_workers=4, collate_fn=dataset.collate_fn, shuffle=False, drop_last=False)
/projects/TTS/datasets/TTSDataset.py in __init__(self, outputs_per_step, text_cleaner, ap, meta_data, batch_group_size, min_seq_len, max_seq_len, use_phonemes, phoneme_cache_path, phoneme_language, enable_eos_bos, verbose)
45 self.items = meta_data
46 self.outputs_per_step = outputs_per_step
---> 47 self.sample_rate = ap.sample_rate
48 self.cleaners = text_cleaner
49 self.min_seq_len = min_seq_len
AttributeError: 'int' object has no attribute 'sample_rate'
Both, TTS and WaveRNN, are current branch "master".
What am I missing? Thanks in advance.
Use the notebook from this repository
https://github.com/mozilla/TTS/blob/master/notebooks/ExtractTTSpectrogram.ipynb
Thanks, that works for me.
Hi,
I had the same probelm when I try to execute ExtractTTSpectrogram.ipynb.
"AttributeError: 'int' object has no attribute 'sample_rate'"
Following the above recommendation, I downloaded the recommended version of the notebook from the above url. This time sample rate related error is gone. But this time I am having more interesting error message in the next step:
TypeError Traceback (most recent call last)
5 losses = []
6 postnet_losses = []
----> 7 criterion = L1LossMasked()
8 with torch.no_grad():
9 for data in tqdm(loader):
TypeError: __init__() missing 1 required positional argument: 'seq_len_norm'
Could you please help me with this error? Whatever I tried I could not get rid over this error message? In my tts config and wavernn config, in both, I added seq_len_norm parameter and tried it with both true and false values. Each time I restarted jupyter service . However, it keeps giving the same error. It seems like for some reason it cannot read seq_len_norm attribute.
Looking forward to your advices agog.
Thanks in advance.
ExtractTTSpectrogram.html.txt
Note: Just rename the attached ExtractTTSpectrogram.html.txt file as ExtractTTSpectrogram.html to view my notebook.
@yilmazay74 please open a new issue
Hi,
Finally I found the problem. In the notebook code, teh L1LossMasked() is called with the default constructor, without any parameters. However, seq_len_norm attribute is only set when it is called as below: L1LossMasked(seq_len_norm=True|False)
I just updated the ipynb so that L1LossMasked(True) is called. So the seq_len_norm is True. I could also try with False of course.
Then it started to create the mels. However quant directory is still empty. I am not sure quant files will aslo be craeted or not. Anyways, at least I passed this stage.
I wonder, why all versions of the ExtractTTSpectrogram.ipynb on the web is using L1LossMasked() which does not work. Am I missing something?
thanks anyway. It is solved.
Most helpful comment
Hi,
Finally I found the problem. In the notebook code, teh L1LossMasked() is called with the default constructor, without any parameters. However, seq_len_norm attribute is only set when it is called as below: L1LossMasked(seq_len_norm=True|False)
I just updated the ipynb so that L1LossMasked(True) is called. So the seq_len_norm is True. I could also try with False of course.
Then it started to create the mels. However quant directory is still empty. I am not sure quant files will aslo be craeted or not. Anyways, at least I passed this stage.
I wonder, why all versions of the ExtractTTSpectrogram.ipynb on the web is using L1LossMasked() which does not work. Am I missing something?