Skip to content

Commit

Permalink
Merge pull request #3096 from coqui-ai/fix-xtts-v1.1
Browse files Browse the repository at this point in the history
Fix xtts v1.1
  • Loading branch information
erogol authored Oct 21, 2023
2 parents 414f0de + dad6a7b commit 420a90e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TTS/tts/layers/xtts/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from tokenizers import Tokenizer

import pypinyin
import cutlet
from num2words import num2words
from TTS.tts.layers.xtts.zh_num2words import TextNorm as zh_num2words

Expand Down Expand Up @@ -484,10 +483,13 @@ def preprocess_text(self, txt, lang):
if lang == "zh-cn":
txt = chinese_transliterate(txt)
elif lang == "ja":
assert txt[:4] == "[ja]", "Japanese speech should start with the [ja] token."
txt = txt[4:]
if self.katsu is None:
import cutlet
self.katsu = cutlet.Cutlet()
txt = japanese_cleaners(txt, self.katsu)
txt = "[ja]" + txt
else:
raise NotImplementedError()
return txt
Expand Down

0 comments on commit 420a90e

Please sign in to comment.