bootphon / phonemizer

Simple text to phones converter for multiple languages
https://bootphon.github.io/phonemizer/
GNU General Public License v3.0
1.19k stars 166 forks source link

[espeak] Phonemizer phonemize character '~' to 'tɪldə ' #70

Closed Ldoun closed 3 years ago

Ldoun commented 3 years ago

Phonemizer phonemize character '~' to 'tɪldə '

Phonemizer version : 2.2.2 System: Window - Windows Subsystem for Linux

phonemize('~',language='ko',backend='espeak',language_switch='remove-flags',preserve_punctuation=True)

charater '~' can't be pronounced so I think it is wise to delete this character if it was given as input

mmmaat commented 3 years ago

Hi, this is the normal behavior of espeak when it encounters isolated marks to "pronounce" them... You have two solutions.

  1. Filter out those marks from the input
  2. Configure the punctuation_marks argument to keep those marks unprocessed:
>>> phonemize('~',language='ko',backend='espeak',language_switch='remove-flags',preserve_punctuation=True, punctuation_marks='~') 
'~'
Ldoun commented 3 years ago

okay got it~ thanks for the reply