carlosdanielhernandezmena commited on
Commit
f4b16ad
1 Parent(s): 5be824f

Fixing a windows compatibility issue

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