carlosdanielhernandezmena commited on
Commit
db99c2d
1 Parent(s): f33b927

Fixing a windows compatibility issue

Browse files
Files changed (1) hide show
  1. raddromur_asr.py +2 -1
raddromur_asr.py CHANGED
@@ -111,7 +111,8 @@ class RaddromurAsr(datasets.GeneratorBasedBuilder):
111
 
112
  for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
113
  for audio_filename, audio_file in audio_archive:
114
- audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
 
115
  path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
116
 
117
  yield audio_id, {
 
111
 
112
  for audio_archive, local_extracted_archive_path in zip(audio_archives, local_extracted_archives_paths):
113
  for audio_filename, audio_file in audio_archive:
114
+ #audio_id = audio_filename.split(os.sep)[-1].split(_AUDIO_EXTENSIONS)[0]
115
+ audio_id =os.path.splitext(os.path.basename(audio_filename))[0]
116
  path = os.path.join(local_extracted_archive_path, audio_filename) if local_extracted_archive_path else audio_filename
117
 
118
  yield audio_id, {