phongdtd commited on
Commit
527f680
·
1 Parent(s): 6e6b986

[Update] Update

Browse files
Files changed (1) hide show
  1. custom_common_voice.py +2 -1
custom_common_voice.py CHANGED
@@ -172,7 +172,7 @@ class CustomCommonVoice(datasets.GeneratorBasedBuilder):
172
  df = df.dropna()
173
  chars_to_ignore_regex = r'[,?.!\-;:"“%\'�]'
174
 
175
- for file_path, script in zip(df["file_path"], df["script"]):
176
  # set full path for mp3 audio file
177
  audio_path = path_to_clips + "/" + file_path
178
 
@@ -186,6 +186,7 @@ class CustomCommonVoice(datasets.GeneratorBasedBuilder):
186
  examples[audio_path] = {
187
  "file_path": audio_path,
188
  "script": script,
 
189
  }
190
 
191
  # inside_clips_dir = False
 
172
  df = df.dropna()
173
  chars_to_ignore_regex = r'[,?.!\-;:"“%\'�]'
174
 
175
+ for file_path, script, duration in zip(df["file_path"], df["script"], df["duration"]):
176
  # set full path for mp3 audio file
177
  audio_path = path_to_clips + "/" + file_path
178
 
 
186
  examples[audio_path] = {
187
  "file_path": audio_path,
188
  "script": script,
189
+ "duration": duration
190
  }
191
 
192
  # inside_clips_dir = False