mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-06 15:44:17 +00:00
18 lines
710 B
Python
18 lines
710 B
Python
# https://github.com/jaywalnut310/vits/blob/main/text/symbols.py
|
|
""" from https://github.com/keithito/tacotron """
|
|
|
|
'''
|
|
Defines the set of symbols used in text input to the model.
|
|
'''
|
|
_pad = '_'
|
|
_punctuation = ';:,.!?¡¿—…"«»“” '
|
|
_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
|
_letters_ipa = "ɑɐɒæɓʙβɔɕçɗɖðʤəɘɚɛɜɝɞɟʄɡɠɢʛɦɧħɥʜɨɪʝɭɬɫɮʟɱɯɰŋɳɲɴøɵɸθœɶʘɹɺɾɻʀʁɽʂʃʈʧʉʊʋⱱʌɣɤʍχʎʏʑʐʒʔʡʕʢǀǁǂǃˈˌːˑʼʴʰʱʲʷˠˤ˞↓↑→↗↘'̩'ᵻ"
|
|
|
|
|
|
# Export all symbols:
|
|
symbol_table = [_pad] + list(_punctuation) + list(_letters) + list(_letters_ipa)
|
|
|
|
# Special symbol ids
|
|
SPACE_ID = symbol_table.index(" ")
|