diff --git a/examples/tacotron2/ljspeech.py b/examples/tacotron2/ljspeech.py index 6efbea6..ad6cfbc 100644 --- a/examples/tacotron2/ljspeech.py +++ b/examples/tacotron2/ljspeech.py @@ -86,9 +86,10 @@ class LJSpeechCollector(object): for i, _ in sorted( zip(mel_lens, text_lens), key=lambda x: x[1], reverse=True) ] + mel_lens = np.array(mel_lens, dtype=np.int64) - text_lens = sorted(text_lens, reverse=True) + text_lens = np.array(sorted(text_lens, reverse=True), dtype=np.int64) # Pad sequence with largest len of the batch texts = batch_text_id(texts, pad_id=self.padding_idx)