tecasoftai commited on
Commit
d857617
·
verified ·
1 Parent(s): aa67214

update hubertbase and whisper to also convert into ipa for ranking

Browse files
Files changed (1) hide show
  1. utils/load_model.py +2 -0
utils/load_model.py CHANGED
@@ -69,6 +69,7 @@ def run_hubert_base(wav):
69
  text = base_proc.batch_decode(ids)[0]
70
  # Convert to phonemes (CMU-like string without stresses)
71
  phonemes = text_to_phoneme(text)
 
72
  return phonemes.strip(), time.time() - start
73
 
74
  def run_whisper(wav):
@@ -86,6 +87,7 @@ def run_whisper(wav):
86
 
87
  text = whisper_proc.batch_decode(pred_ids, skip_special_tokens=True)[0]
88
  phonemes = text_to_phoneme(text)
 
89
  return phonemes.strip(), time.time() - start
90
 
91
 
 
69
  text = base_proc.batch_decode(ids)[0]
70
  # Convert to phonemes (CMU-like string without stresses)
71
  phonemes = text_to_phoneme(text)
72
+ phonemes = cmu_to_ipa(phonemes)
73
  return phonemes.strip(), time.time() - start
74
 
75
  def run_whisper(wav):
 
87
 
88
  text = whisper_proc.batch_decode(pred_ids, skip_special_tokens=True)[0]
89
  phonemes = text_to_phoneme(text)
90
+ phonemes = cmu_to_ipa(phonemes)
91
  return phonemes.strip(), time.time() - start
92
 
93