Contenerized text-to-speech engine based on Facebook's Massively Multilingual Speech model with web API
Jacek Kowalski
2024-08-01 e87b6e7606964ef0cf096da009178f3eaa2628b6
1
2
3
4
5
6
7
8
9
import transformers
 
from config import LanguageModel
 
for lang in LanguageModel:
    tokenizer = transformers.AutoTokenizer.from_pretrained('facebook/mms-tts-' + lang.name)
    tokenizer.save_pretrained('./data/tokenizer/facebook/mms-tts-' + lang.name)
    model = transformers.VitsModel.from_pretrained('facebook/mms-tts-' + lang.name)
    model.save_pretrained('./data/model/facebook/mms-tts-' + lang.name)