ugshanyu commited on
Commit
02f27df
1 Parent(s): b8812d9

Update jambal2.py

Browse files
Files changed (1) hide show
  1. jambal2.py +5 -8
jambal2.py CHANGED
@@ -63,12 +63,9 @@ class CustomDataset(datasets.GeneratorBasedBuilder):
63
  original_sentence_id, sentence, locale = row.values()
64
  audio_file = f"{original_sentence_id}.mp3"
65
  audio_file_path = os.path.join(audio_path, audio_file)
66
- try:
67
- yield key, {
68
- "audio": audio_file_path,
69
- "sentence": sentence,
70
- }
71
- key += 1
72
- except Exception as e:
73
- logger.warning(f"Skipping file {audio_file_path} due to error: {str(e)}")
74
  #!pip install datasets
 
63
  original_sentence_id, sentence, locale = row.values()
64
  audio_file = f"{original_sentence_id}.mp3"
65
  audio_file_path = os.path.join(audio_path, audio_file)
66
+ yield key, {
67
+ "audio": audio_file_path,
68
+ "sentence": sentence,
69
+ }
70
+ key += 1
 
 
 
71
  #!pip install datasets