SonishMaharjan commited on
Commit
66ea560
1 Parent(s): 0455a29

Update asr_nepali.py

Browse files
Files changed (1) hide show
  1. asr_nepali.py +3 -3
asr_nepali.py CHANGED
@@ -79,7 +79,7 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
79
  features = datasets.Features(
80
  {
81
 
82
- "path": datasets.Value("string"),
83
  "audio": datasets.features.Audio(sampling_rate=48_000),
84
  "transcription": datasets.Value("string"),
85
 
@@ -105,12 +105,12 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
105
  splits = ("train", "test")
106
  for split in splits:
107
  audio_urls[split] = [
108
- _AUDIO_URL.format(lang=lang, split=split, shard_idx=i) for i in range(n_shards[lang][split])
109
  ]
110
  archive_paths = dl_manager.download(audio_urls)
111
  local_extracted_archive_paths = dl_manager.extract(archive_paths) if not dl_manager.is_streaming else {}
112
 
113
- meta_urls = {split: _TRANSCRIPT_URL.format(lang=lang, split=split) for split in splits}
114
  meta_paths = dl_manager.download_and_extract(meta_urls)
115
 
116
  split_generators = []
 
79
  features = datasets.Features(
80
  {
81
 
82
+ "file_path": datasets.Value("string"),
83
  "audio": datasets.features.Audio(sampling_rate=48_000),
84
  "transcription": datasets.Value("string"),
85
 
 
105
  splits = ("train", "test")
106
  for split in splits:
107
  audio_urls[split] = [
108
+ _AUDIO_URL.format(split=split) for i in range(n_shards['asr_nepali'][split])
109
  ]
110
  archive_paths = dl_manager.download(audio_urls)
111
  local_extracted_archive_paths = dl_manager.extract(archive_paths) if not dl_manager.is_streaming else {}
112
 
113
+ meta_urls = {split: _TRANSCRIPT_URL.format(lang='asr_nepali', split=split) for split in splits}
114
  meta_paths = dl_manager.download_and_extract(meta_urls)
115
 
116
  split_generators = []