RaidenTTS / text /cleaners.py
ORI-Muchim's picture
Update text/cleaners.py
49ebe40
raw
history blame contribute delete
361 Bytes
import re
from text.korean import latin_to_hangul, number_to_hangul, divide_hangul, korean_to_lazy_ipa, korean_to_ipa
def korean_cleaners(text):
'''Pipeline for Korean text'''
text = latin_to_hangul(text)
text = number_to_hangul(text)
text = divide_hangul(text)
if re.match('[\u3131-\u3163]', text[-1]):
text += '.'
return text