arxyzan commited on
Commit
f2650cb
1 Parent(s): 4b0f1bb

Update common-voice-13-fa.py

Browse files
Files changed (1) hide show
  1. common-voice-13-fa.py +5 -1
common-voice-13-fa.py CHANGED
@@ -111,9 +111,13 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
111
  metadata = {}
112
  with open(transcript_path, encoding="utf-8") as f:
113
  reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
114
- for row in reader:
115
  if not row["path"].endswith(".mp3"):
116
  row["path"] += ".mp3"
 
 
 
 
117
  # if data is incomplete, fill with empty values
118
  for field in data_fields:
119
  if field not in row:
 
111
  metadata = {}
112
  with open(transcript_path, encoding="utf-8") as f:
113
  reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
114
+ for row in tqdm(reader, desc="Reading metadata..."):
115
  if not row["path"].endswith(".mp3"):
116
  row["path"] += ".mp3"
117
+ # accent -> accents in CV 8.0
118
+ if "accents" in row:
119
+ row["accent"] = row["accents"]
120
+ del row["accents"]
121
  # if data is incomplete, fill with empty values
122
  for field in data_fields:
123
  if field not in row: