Datasets:

ArXiv:
License:
polinaeterna HF staff commited on
Commit
d1ba203
1 Parent(s): 48e4faf

exclude not found files in streaming too

Browse files
Files changed (1) hide show
  1. evi.py +1 -2
evi.py CHANGED
@@ -159,7 +159,6 @@ class Evi(datasets.GeneratorBasedBuilder):
159
  texts_reader = csv.DictReader(
160
  fin, delimiter="\t", skipinitialspace=True
161
  )
162
- i = 0
163
  for dictrow in texts_reader:
164
  dialogue_id = dictrow["dialogue_id"]
165
  turn_id = dictrow["turn_num"]
@@ -170,7 +169,7 @@ class Evi(datasets.GeneratorBasedBuilder):
170
  f'{turn_id}.wav'
171
  )
172
  full_path = os.path.join(audio_data_path, file_path)
173
- if not full_path.startswith("zip") and not os.path.isfile(full_path):
174
  warnings.warn(f"{full_path} not found.")
175
  continue
176
 
 
159
  texts_reader = csv.DictReader(
160
  fin, delimiter="\t", skipinitialspace=True
161
  )
 
162
  for dictrow in texts_reader:
163
  dialogue_id = dictrow["dialogue_id"]
164
  turn_id = dictrow["turn_num"]
 
169
  f'{turn_id}.wav'
170
  )
171
  full_path = os.path.join(audio_data_path, file_path)
172
+ if not os.path.isfile(full_path):
173
  warnings.warn(f"{full_path} not found.")
174
  continue
175