mirror of https://github.com/coqui-ai/TTS.git
Rename phoneme_cleaners
parent
bec543b3a5
commit
764c7fa4a4
|
@ -119,7 +119,6 @@ def synthesis(
|
|||
do_trim_silence=False,
|
||||
d_vector=None,
|
||||
language_id=None,
|
||||
language_name=None,
|
||||
):
|
||||
"""Synthesize voice for the given text using Griffin-Lim vocoder or just compute output features to be passed to
|
||||
the vocoder model.
|
||||
|
@ -154,9 +153,6 @@ def synthesis(
|
|||
|
||||
language_id (int):
|
||||
Language ID passed to the language embedding layer in multi-langual model. Defaults to None.
|
||||
|
||||
language_name (str):
|
||||
Language name corresponding to the language code used by the phonemizer. Defaults to None.
|
||||
"""
|
||||
# GST processing
|
||||
style_mel = None
|
||||
|
|
|
@ -100,6 +100,16 @@ def english_cleaners(text):
|
|||
return text
|
||||
|
||||
|
||||
def english_phoneme_cleaners(text):
|
||||
"""Pipeline for phonemes mode, including number and abbreviation expansion."""
|
||||
text = en_normalize_numbers(text)
|
||||
text = expand_abbreviations(text)
|
||||
text = replace_symbols(text)
|
||||
text = remove_aux_symbols(text)
|
||||
text = collapse_whitespace(text)
|
||||
return text
|
||||
|
||||
|
||||
def french_cleaners(text):
|
||||
"""Pipeline for French text. There is no need to expand numbers, phonemizer already does that"""
|
||||
text = expand_abbreviations(text, lang="fr")
|
||||
|
@ -126,17 +136,6 @@ def chinese_mandarin_cleaners(text: str) -> str:
|
|||
return text
|
||||
|
||||
|
||||
def phoneme_cleaners(text):
|
||||
"""Pipeline for phonemes mode, including number and abbreviation expansion."""
|
||||
text = en_normalize_numbers(text)
|
||||
# text = convert_to_ascii(text)
|
||||
text = expand_abbreviations(text)
|
||||
text = replace_symbols(text)
|
||||
text = remove_aux_symbols(text)
|
||||
text = collapse_whitespace(text)
|
||||
return text
|
||||
|
||||
|
||||
def multilingual_cleaners(text):
|
||||
"""Pipeline for multilingual text"""
|
||||
text = lowercase(text)
|
||||
|
|
Loading…
Reference in New Issue