mirror of https://github.com/coqui-ai/TTS.git
Preserve [ja] token of the text processing
This commit is contained in:
parent
c7a16042e3
commit
dad6a7b0b6
|
@ -483,10 +483,13 @@ class VoiceBpeTokenizer:
|
||||||
if lang == "zh-cn":
|
if lang == "zh-cn":
|
||||||
txt = chinese_transliterate(txt)
|
txt = chinese_transliterate(txt)
|
||||||
elif lang == "ja":
|
elif lang == "ja":
|
||||||
|
assert txt[:4] == "[ja]", "Japanese speech should start with the [ja] token."
|
||||||
|
txt = txt[4:]
|
||||||
if self.katsu is None:
|
if self.katsu is None:
|
||||||
import cutlet
|
import cutlet
|
||||||
self.katsu = cutlet.Cutlet()
|
self.katsu = cutlet.Cutlet()
|
||||||
txt = japanese_cleaners(txt, self.katsu)
|
txt = japanese_cleaners(txt, self.katsu)
|
||||||
|
txt = "[ja]" + txt
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
return txt
|
return txt
|
||||||
|
|
Loading…
Reference in New Issue