""" from https://github.com/keithito/tacotron """ ''' Defines the set of symbols used in text input to the model. ''' _pad = '_' _punctuation = ';:,.!?¡¿—…"«»“” ' _punctuation_zh = ';:,。!?-“”《》、()BP…—~.\·『』・ ' _letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' _numbers = '1234567890' _others = '' _letters_ipa = "ɑɐɒæɓʙβɔɕçɗɖðʤəɘɚɛɜɝɞɟʄɡɠɢʛɦɧħɥʜɨɪʝɭɬɫɮʟɱɯɰŋɳɲɴøɵɸθœɶʘɹɺɾɻʀʁɽʂʃʈʧʉʊʋⱱʌɣɤʍχʎʏʑʐʒʔʡʕʢǀǁǂǃˈˌːˑʼʴʰʱʲʷˠˤ˞↓↑→↗↘'̩'ᵻ" # Export all symbols: symbols = [_pad] + list(_punctuation) + list(_letters) + list(_letters_ipa) symbols_zh = [_pad] + list(_punctuation_zh) + list(_letters) + list(_numbers) # Special symbol ids SPACE_ID = symbols.index(" ")