Ask questionsPR: Use german_transliterate as German cleaner lib


@thorstenMueller just let me know that external cleaners for French have been integrated. Since we for quite some time are using my German cleaner lib german_transliterate in the German TTS project, I suggest to integrate it into Mozilla TTS as well for German language.

It can be integrated as any other pip resource except it needs the git interface:

pip install git+

Here is a snippet for code integration for phoneme-based cleaning:

from german_transliterate.core import GermanTransliterate

# use these setting for PHONEMIC ENCODINGS as input
cleaned_text =  GermanTransliterate(replace={';': ',', ':': ' '}, sep_abbreviation=' -- ').transliterate(raw_text)

or these for character-based cleaning:

from german_transliterate.core import GermanTransliterate
ops = {'acronym_phoneme', 'accent_peculiarity', 'amount_money', 'date', 'timestamp',
        'weekday', 'month', 'time_of_day', 'ordinal', 'special', 'math_symbol', 'spoken_symbol'}

# use none or your own for other purposes than phonemic encoding and do not use 'spoken_symbol' or 'acronym_phoneme'
cleaned_text =  GermanTransliterate(transliterate_ops=list(ops-{'spoken_symbol', 'acronym_phoneme'})).transliterate(raw_text)

More information to be found on the github README page:


Answer questions stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discourse page for further help.

Github User Rank List