Update jambal2.py
Browse files- 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 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
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
|