-
-
Notifications
You must be signed in to change notification settings - Fork 274
use chatterbox MTLTokenizer for multilingual. #362
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
use chatterbox MTLTokenizer for multilingual. #362
Conversation
litmudoc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use MTLTokenizer for Chatterbox Multilingual support. Thank you.
|
Hey @litmudoc Awesome, do you have any audio samples .? |
This is a sample created with the Chatterbox multilingual model on local Mac.
|
Blaizzy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
6b92122 to
f3c387d
Compare
Context
The Chatterbox TTS model supports multilingual text-to-speech, but the tokenizer selection code was not properly configuring MTLTokenizer for multilingual models. When a model with "multilingual": true in its config..json was loaded, it would incorrectly use the English tokenizer (EnTokenizer) instead of the multilingual tokenizer.
Description
Modified
_init_tokenizers()andfrom_pretrained(),post_load_hook()methods inchatterbox.pyto:config.jsonin the model directory"multilingual"configuration flag from JSON configMTLTokenizerwhen multilingual is enabled, orEnTokenizerfor English-only modelsChanges in the codebase
config.["multilingual"]and instantiate the appropriate tokenizer classMTLTokenizerto imports alongside existingEnTokenizer_init_tokenizers(),load()method for S3 checkpoints, andload()method for model loadingAdditional information
This change enables Chatterbox multilingual TTS models to properly tokenize input text, which is required for text-to-speech generation in multiple languages. The implementation follows the existing pattern of checking model configuration files.
Checklist