mirror of https://github.com/coqui-ai/TTS.git
parent
d63a6bb690
commit
8fffd4e813
|
@ -244,6 +244,7 @@ class TTSDataset(Dataset):
|
|||
# TODO: find a better fix
|
||||
return self.load_data(self.rescue_item_idx)
|
||||
|
||||
pitch = None
|
||||
if self.compute_f0:
|
||||
pitch = self._load_or_compute_pitch(self.ap, wav_file, self.f0_cache_path)
|
||||
|
||||
|
|
|
@ -45,12 +45,10 @@ def text2phone(text, language, use_espeak_phonemes=False):
|
|||
# TO REVIEW : How to have a good implementation for this?
|
||||
if language == "zh-CN":
|
||||
ph = chinese_text_to_phonemes(text)
|
||||
print(" > Phonemes: {}".format(ph))
|
||||
return ph
|
||||
|
||||
if language == "ja-jp":
|
||||
ph = japanese_text_to_phonemes(text)
|
||||
print(" > Phonemes: {}".format(ph))
|
||||
return ph
|
||||
|
||||
if gruut.is_language_supported(language):
|
||||
|
@ -80,7 +78,6 @@ def text2phone(text, language, use_espeak_phonemes=False):
|
|||
|
||||
# Fix a few phonemes
|
||||
ph = ph.translate(GRUUT_TRANS_TABLE)
|
||||
|
||||
return ph
|
||||
|
||||
raise ValueError(f" [!] Language {language} is not supported for phonemization.")
|
||||
|
|
Loading…
Reference in New Issue