Instructions to use facebook/mms-tts-eng with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/mms-tts-eng with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="facebook/mms-tts-eng")# Load model directly from transformers import AutoTokenizer, AutoModelForTextToWaveform tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-eng") model = AutoModelForTextToWaveform.from_pretrained("facebook/mms-tts-eng") - Notebooks
- Google Colab
- Kaggle
Unable to creating output file using scipy
#9
by Yadunandana - opened
This comment has been hidden
This comment has been hidden
If you just want to synthesize audio, you only need 5 lines of code. 1 line: from transformers import pipeline 2 line: import scipy 3 line: pipe = pipeline("text-to-speech", model="facebook/mms-tts-eng", device=0) 4 line: results = pipe("your text") 5 line: scipy.io.wavfile.write("audio_vits.wav", rate=results["sampling_rate"], data=results["audio"].squeeze())
PS:
Create a text file and paste the code into it. Then change its extension from "txt" to "py". Python only runs scripts with the extension "py". You need Python and the necessary libraries installed (transformers, torch==2.0.1, torchvision==0.15.2, torchaudio==2.0.2 and phonemizer).