update hubertbase and whisper to also convert into ipa for ranking (#1)
Browse files- update hubertbase and whisper to also convert into ipa for ranking (d8576170b79672e529a4a79bc2f98b34d46600db)
Co-authored-by: TecaSoftAndTech <tecasoftai@users.noreply.huggingface.co>
- 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 |
|