alaleye commited on
Commit
0199a19
1 Parent(s): 774af50

fix wolof dev transcripts

Browse files
Files changed (2) hide show
  1. aloresb.py +12 -2
  2. audio/wolof/dev/transcripts.txt +0 -1
aloresb.py CHANGED
@@ -109,7 +109,8 @@ class Aloresb(datasets.GeneratorBasedBuilder):
109
  ),
110
  ]
111
  if self.config.name in ["hausa", "wolof"]:
112
- train_splits.append(
 
113
  datasets.SplitGenerator(
114
  name=datasets.Split.VALIDATION, gen_kwargs={
115
  "transcript_path": transcripts["dev"],
@@ -117,7 +118,15 @@ class Aloresb(datasets.GeneratorBasedBuilder):
117
  "local_extracted_archive": local_extracted_archives.get("dev"),
118
  }
119
  ),
120
- )
 
 
 
 
 
 
 
 
121
  return train_splits + [
122
  datasets.SplitGenerator(
123
  name=datasets.Split.TEST, gen_kwargs={
@@ -133,6 +142,7 @@ class Aloresb(datasets.GeneratorBasedBuilder):
133
  Generate examples as dicts.
134
  """
135
  transcripts = {}
 
136
  with open(transcript_path, encoding="utf-8") as f:
137
  for line in f:
138
  audio_id, text = line.strip().split("\t")
 
109
  ),
110
  ]
111
  if self.config.name in ["hausa", "wolof"]:
112
+ print('IIIIIIIIII')
113
+ return train_splits + [
114
  datasets.SplitGenerator(
115
  name=datasets.Split.VALIDATION, gen_kwargs={
116
  "transcript_path": transcripts["dev"],
 
118
  "local_extracted_archive": local_extracted_archives.get("dev"),
119
  }
120
  ),
121
+ datasets.SplitGenerator(
122
+ name=datasets.Split.TEST, gen_kwargs={
123
+ "transcript_path": transcripts["test"],
124
+ "audio_archives": [dl_manager.iter_archive(archive) for archive in audio_archives["test"]],
125
+ "local_extracted_archive": local_extracted_archives.get("test"),
126
+ }
127
+ ),
128
+ ]
129
+ print(train_splits)
130
  return train_splits + [
131
  datasets.SplitGenerator(
132
  name=datasets.Split.TEST, gen_kwargs={
 
142
  Generate examples as dicts.
143
  """
144
  transcripts = {}
145
+ print('XXXXX', transcript_path)
146
  with open(transcript_path, encoding="utf-8") as f:
147
  for line in f:
148
  audio_id, text = line.strip().split("\t")
audio/wolof/dev/transcripts.txt CHANGED
@@ -1,4 +1,3 @@
1
-
2
  WOL_03_lect_0001 seen suuf dafa nangu lu ñu fa ji mu sax
3
  WOL_03_lect_0003 war na joxe kayit yii yépp bala weer wu dee
4
  WOL_03_lect_0004 ndaxam mu ngi ne cocc ak téeméeri atam
 
 
1
  WOL_03_lect_0001 seen suuf dafa nangu lu ñu fa ji mu sax
2
  WOL_03_lect_0003 war na joxe kayit yii yépp bala weer wu dee
3
  WOL_03_lect_0004 ndaxam mu ngi ne cocc ak téeméeri atam