mirror of
https://github.com/wassname/TTS.git
synced 2026-09-11 12:00:24 +08:00
Refactor TTSDataset ⚡️
This commit is contained in:
@@ -216,8 +216,8 @@ class TTSDataset(Dataset):
|
||||
elif len(item) == 3:
|
||||
text, wav_file, speaker_name = item
|
||||
else:
|
||||
raise ValueError(" [!] Dataset cannot parse the sample.")
|
||||
return text, wav_file, speaker_name, language_name, attn_file
|
||||
token_ids = self.tokenizer.text_to_ids(text)
|
||||
return token_ids
|
||||
|
||||
def load_data(self, idx):
|
||||
item = self.samples[idx]
|
||||
|
||||
Reference in New Issue
Block a user