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