Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xtts): support Hindi for sentence-splitting and fine-tuning #4

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions TTS/demos/xtts_ft_demo/xtts_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def read_logs():
"hu",
"ko",
"ja",
"hi",
],
)
progress_data = gr.Label(label="Progress:")
Expand Down Expand Up @@ -370,6 +371,7 @@ def train_model(
"hu",
"ko",
"ja",
"hi",
],
)
tts_text = gr.Textbox(
Expand Down
7 changes: 6 additions & 1 deletion TTS/tts/layers/xtts/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from spacy.lang.ar import Arabic
from spacy.lang.en import English
from spacy.lang.es import Spanish
from spacy.lang.hi import Hindi
from spacy.lang.ja import Japanese
from spacy.lang.zh import Chinese
from tokenizers import Tokenizer
Expand All @@ -19,6 +20,7 @@


def get_spacy_lang(lang):
"""Return Spacy language used for sentence splitting."""
if lang == "zh":
return Chinese()
elif lang == "ja":
Expand All @@ -27,8 +29,10 @@ def get_spacy_lang(lang):
return Arabic()
elif lang == "es":
return Spanish()
elif lang == "hi":
return Hindi()
else:
# For most languages, Enlish does the job
# For most languages, English does the job
return English()


Expand Down Expand Up @@ -611,6 +615,7 @@ def __init__(self, vocab_file=None):
"ja": 71,
"hu": 224,
"ko": 95,
"hi": 150,
}

@cached_property
Expand Down
23 changes: 19 additions & 4 deletions docs/source/models/xtts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,31 @@ There is no need for an excessive amount of training data that spans countless h
### Updates with v2
- Improved voice cloning.
- Voices can be cloned with a single audio file or multiple audio files, without any effect on the runtime.
- 2 new languages: Hungarian and Korean.
- Across the board quality improvements.

### Code
Current implementation only supports inference and GPT encoder training.

### Languages
As of now, XTTS-v2 supports 16 languages: English (en), Spanish (es), French (fr), German (de), Italian (it), Portuguese (pt), Polish (pl), Turkish (tr), Russian (ru), Dutch (nl), Czech (cs), Arabic (ar), Chinese (zh-cn), Japanese (ja), Hungarian (hu) and Korean (ko).

Stay tuned as we continue to add support for more languages. If you have any language requests, please feel free to reach out.
XTTS-v2 supports 17 languages:

- Arabic (ar)
- Chinese (zh-cn)
- Czech (cs)
- Dutch (nl)
- English (en)
- French (fr)
- German (de)
- Hindi (hi)
- Hungarian (hu)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Polish (pl)
- Portuguese (pt)
- Russian (ru)
- Spanish (es)
- Turkish (tr)

### License
This model is licensed under [Coqui Public Model License](https://coqui.ai/cpml).
Expand Down
Loading