mirror of
https://github.com/coqui-ai/TTS.git
synced 2026-02-25 04:31:08 +01:00
Add a cheap trick to avoid short audio clips
This commit is contained in:
@@ -229,7 +229,8 @@ class TTSDataset(Dataset):
|
||||
# after phonemization the text length may change
|
||||
# this is a shareful 🤭 hack to prevent longer phonemes
|
||||
# TODO: find a better fix
|
||||
if len(token_ids) > self.max_text_len:
|
||||
if len(token_ids) > self.max_text_len or len(wav) < self.min_audio_len:
|
||||
self.rescue_item_idx += 1
|
||||
return self.load_data(self.rescue_item_idx)
|
||||
|
||||
# get f0 values
|
||||
|
||||
Reference in New Issue
Block a user