this may result in empty text; skip if so
Browse files
nst.py
CHANGED
@@ -137,6 +137,8 @@ class NSTDataset(datasets.GeneratorBasedBuilder):
|
|
137 |
text = recording["text"]
|
138 |
if self.config.name != "speech_no_norm":
|
139 |
text = normalise(text)
|
|
|
|
|
140 |
lang_part = pid[0:2]
|
141 |
for num in ["1", "2"]:
|
142 |
tar_path = f"{lang_part}/{pid}/{pid}_{bare_path}-{num}.wav"
|
|
|
137 |
text = recording["text"]
|
138 |
if self.config.name != "speech_no_norm":
|
139 |
text = normalise(text)
|
140 |
+
if text is None or text == "":
|
141 |
+
continue
|
142 |
lang_part = pid[0:2]
|
143 |
for num in ["1", "2"]:
|
144 |
tar_path = f"{lang_part}/{pid}/{pid}_{bare_path}-{num}.wav"
|