mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-04 17:59:19 +08:00
Merge pull request #103 from jimregan/mmconv-cleaner
add a cleaner for IPA data (pre-phonetised)
This commit is contained in:
@@ -114,6 +114,20 @@ def english_cleaners2(text):
|
|||||||
return phonemes
|
return phonemes
|
||||||
|
|
||||||
|
|
||||||
|
def ipa_simplifier(text):
|
||||||
|
replacements = [
|
||||||
|
("ɐ", "ə"),
|
||||||
|
("ˈə", "ə"),
|
||||||
|
("ʤ", "dʒ"),
|
||||||
|
("ʧ", "tʃ"),
|
||||||
|
("ᵻ", "ɪ"),
|
||||||
|
]
|
||||||
|
for replacement in replacements:
|
||||||
|
text = text.replace(replacement[0], replacement[1])
|
||||||
|
phonemes = collapse_whitespace(text)
|
||||||
|
return phonemes
|
||||||
|
|
||||||
|
|
||||||
# I am removing this due to incompatibility with several version of python
|
# I am removing this due to incompatibility with several version of python
|
||||||
# However, if you want to use it, you can uncomment it
|
# However, if you want to use it, you can uncomment it
|
||||||
# and install piper-phonemize with the following command:
|
# and install piper-phonemize with the following command:
|
||||||
|
|||||||
Reference in New Issue
Block a user