carlosdanielhernandezmena commited on
Commit
c974940
1 Parent(s): c5529e8

Fixing a windows compatibility issue

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