Update builder.py
Browse files- builder.py +3 -3
builder.py
CHANGED
|
@@ -45,7 +45,7 @@ The audio files are sampled at rate of 16KHz, and leading and trailing silences
|
|
| 45 |
_URL = "https://huggingface.co/datasets/SumitMdhr/ASR/resolve/main/"
|
| 46 |
_URLS = {
|
| 47 |
"zipfile": _URL + "CLEAN_DATA.zip",
|
| 48 |
-
"index_file": _URL + "metedata1.
|
| 49 |
}
|
| 50 |
|
| 51 |
|
|
@@ -87,8 +87,8 @@ class ASR_SAM(datasets.GeneratorBasedBuilder):
|
|
| 87 |
]
|
| 88 |
|
| 89 |
def _generate_examples(self, index_file, audio_paths):
|
| 90 |
-
with open(index_file, encoding="utf-8") as
|
| 91 |
-
reader = csv.DictReader(
|
| 92 |
for key, row in enumerate(reader):
|
| 93 |
path = os.path.join(audio_paths, 'CLEAN_DATA', row['utterance_id'])
|
| 94 |
yield key, {
|
|
|
|
| 45 |
_URL = "https://huggingface.co/datasets/SumitMdhr/ASR/resolve/main/"
|
| 46 |
_URLS = {
|
| 47 |
"zipfile": _URL + "CLEAN_DATA.zip",
|
| 48 |
+
"index_file": _URL + "metedata1.csv",
|
| 49 |
}
|
| 50 |
|
| 51 |
|
|
|
|
| 87 |
]
|
| 88 |
|
| 89 |
def _generate_examples(self, index_file, audio_paths):
|
| 90 |
+
with open(index_file, encoding="utf-8") as fp:
|
| 91 |
+
reader = csv.DictReader(fp)
|
| 92 |
for key, row in enumerate(reader):
|
| 93 |
path = os.path.join(audio_paths, 'CLEAN_DATA', row['utterance_id'])
|
| 94 |
yield key, {
|