carlosdanielhernandezmena commited on
Commit
7fe8e65
1 Parent(s): e2bfacf

Fixing a windows compatibility issue

Browse files
Files changed (1) hide show
  1. samromur_children.py +2 -1
samromur_children.py CHANGED
@@ -144,7 +144,8 @@ class SamromurChildren(datasets.GeneratorBasedBuilder):
144
 
145
  for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
146
  for audio_filename, audio_file in audio_archive:
147
- audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
 
148
  path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
149
 
150
  yield audio_id, {
 
144
 
145
  for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
146
  for audio_filename, audio_file in audio_archive:
147
+ #audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
148
+ audio_id =os.path.splitext(os.path.basename(audio_filename))[0]
149
  path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
150
 
151
  yield audio_id, {