NTT123/vietTTS

number, date, ... to speech

luuvanduc1999 opened this issue · 1 comments

What do I need to do to work with number, date,... ? normalize_text or config model

You need to modify the following function:

def nat_normalize_text(text):
text = unicodedata.normalize('NFKC', text)
text = text.lower().strip()
sp = FLAGS.special_phonemes[FLAGS.sp_index]
text = re.sub(r'[\n.,:]+', f' {sp} ', text)
text = text.replace('"', " ")
text = re.sub(r'\s+', ' ', text)
text = re.sub(r'[.,:;?!]+', f' {sp} ', text)
text = re.sub('[ ]+', ' ', text)
text = re.sub(f'( {sp}+)+ ', f' {sp} ', text)
return text.strip()
text = nat_normalize_text(args.text)
print('Normalized text input:', text)