Skip to content

Commit

Permalink
Add spanish
Browse files Browse the repository at this point in the history
  • Loading branch information
WeberJulian committed Nov 15, 2023
1 parent 2d9525a commit d64cafc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TTS/tts/layers/xtts/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from spacy.lang.zh import Chinese
from spacy.lang.ja import Japanese
from spacy.lang.ar import Arabic
from spacy.lang.es import Spanish


def get_spacy_lang(lang):
Expand All @@ -25,7 +26,10 @@ def get_spacy_lang(lang):
return Japanese()
elif lang == "ar":
return Arabic()
elif lang == "es":
return Spanish()
else:
# For most languages, Enlish does the job
return English()

def split_sentence(text, lang, text_split_length=250):
Expand Down

0 comments on commit d64cafc

Please sign in to comment.