mirror of https://github.com/coqui-ai/TTS.git
remove _phoneme_punctuations
This commit is contained in:
parent
194f82de51
commit
5b8a6736a7
|
@ -6,7 +6,7 @@ import phonemizer
|
||||||
from packaging import version
|
from packaging import version
|
||||||
from phonemizer.phonemize import phonemize
|
from phonemizer.phonemize import phonemize
|
||||||
from TTS.tts.utils.text import cleaners
|
from TTS.tts.utils.text import cleaners
|
||||||
from TTS.tts.utils.text.symbols import (_bos, _eos, _phoneme_punctuations,
|
from TTS.tts.utils.text.symbols import (_bos, _eos, _punctuations,
|
||||||
make_symbols, phonemes, symbols)
|
make_symbols, phonemes, symbols)
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ _phonemes = phonemes
|
||||||
_CURLY_RE = re.compile(r'(.*?)\{(.+?)\}(.*)')
|
_CURLY_RE = re.compile(r'(.*?)\{(.+?)\}(.*)')
|
||||||
|
|
||||||
# Regular expression matching punctuations, ignoring empty space
|
# Regular expression matching punctuations, ignoring empty space
|
||||||
PHONEME_PUNCTUATION_PATTERN = r'['+_phoneme_punctuations+']+'
|
PHONEME_PUNCTUATION_PATTERN = r'['+_punctuations+']+'
|
||||||
|
|
||||||
|
|
||||||
def text2phone(text, language):
|
def text2phone(text, language):
|
||||||
|
|
|
@ -5,6 +5,8 @@ Defines the set of symbols used in text input to the model.
|
||||||
The default is a set of ASCII characters that works well for English or text that has been run
|
The default is a set of ASCII characters that works well for English or text that has been run
|
||||||
through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details.
|
through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def make_symbols(characters, phonemes=None, punctuations='!\'(),-.:;? ', pad='_', eos='~', bos='^'):# pylint: disable=redefined-outer-name
|
def make_symbols(characters, phonemes=None, punctuations='!\'(),-.:;? ', pad='_', eos='~', bos='^'):# pylint: disable=redefined-outer-name
|
||||||
''' Function to create symbols and phonemes '''
|
''' Function to create symbols and phonemes '''
|
||||||
_symbols = [pad, eos, bos] + list(characters)
|
_symbols = [pad, eos, bos] + list(characters)
|
||||||
|
@ -18,15 +20,14 @@ def make_symbols(characters, phonemes=None, punctuations='!\'(),-.:;? ', pad='_'
|
||||||
_symbols += _arpabet
|
_symbols += _arpabet
|
||||||
return _symbols, _phonemes
|
return _symbols, _phonemes
|
||||||
|
|
||||||
|
|
||||||
_pad = '_'
|
_pad = '_'
|
||||||
_eos = '~'
|
_eos = '~'
|
||||||
_bos = '^'
|
_bos = '^'
|
||||||
_characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;? '
|
_characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;? '
|
||||||
_punctuations = '!\'(),-.:;? '
|
_punctuations = '!\'(),-.:;? '
|
||||||
_phoneme_punctuations = '.!;:,?'
|
# _phoneme_punctuations = '.!;:,?'
|
||||||
|
|
||||||
# Phonemes definition
|
# Phonemes definition (All IPA characters)
|
||||||
_vowels = 'iyɨʉɯuɪʏʊeøɘəɵɤoɛœɜɞʌɔæɐaɶɑɒᵻ'
|
_vowels = 'iyɨʉɯuɪʏʊeøɘəɵɤoɛœɜɞʌɔæɐaɶɑɒᵻ'
|
||||||
_non_pulmonic_consonants = 'ʘɓǀɗǃʄǂɠǁʛ'
|
_non_pulmonic_consonants = 'ʘɓǀɗǃʄǂɠǁʛ'
|
||||||
_pulmonic_consonants = 'pbtdʈɖcɟkɡqɢʔɴŋɲɳnɱmʙrʀⱱɾɽɸβfvθðszʃʒʂʐçʝxɣχʁħʕhɦɬɮʋɹɻjɰlɭʎʟ'
|
_pulmonic_consonants = 'pbtdʈɖcɟkɡqɢʔɴŋɲɳnɱmʙrʀⱱɾɽɸβfvθðszʃʒʂʐçʝxɣχʁħʕhɦɬɮʋɹɻjɰlɭʎʟ'
|
||||||
|
|
Loading…
Reference in New Issue