jimregan commited on
Commit
6d8566e
1 Parent(s): c1e9157

this may result in empty text; skip if so

Browse files
Files changed (1) hide show
  1. nst.py +2 -0
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"