Contenerized text-to-speech engine based on Facebook's Massively Multilingual Speech model with web API
Jacek Kowalski
2024-08-01 4e7cca817db059c308103fe0e0b03c3241816d8d
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)