cahya commited on
Commit
cddc85a
1 Parent(s): 4a5c974

fixed the evaluation sampling rate

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -88,13 +88,13 @@ model.to("cuda")
88
 
89
  chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\'\”\�]'
90
 
91
- resampler = torchaudio.transforms.Resample(48_000, 16_000)
92
 
93
  # Preprocessing the datasets.
94
  # We need to read the aduio files as arrays
95
  def speech_file_to_array_fn(batch):
96
  batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
97
  speech_array, sampling_rate = torchaudio.load(batch["path"])
 
98
  batch["speech"] = resampler(speech_array).squeeze().numpy()
99
  return batch
100
 
88
 
89
  chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\'\”\�]'
90
 
 
91
 
92
  # Preprocessing the datasets.
93
  # We need to read the aduio files as arrays
94
  def speech_file_to_array_fn(batch):
95
  batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
96
  speech_array, sampling_rate = torchaudio.load(batch["path"])
97
+ resampler = torchaudio.transforms.Resample(sampling_rate, 16_000)
98
  batch["speech"] = resampler(speech_array).squeeze().numpy()
99
  return batch
100