Run this model with HF Jobs
Run facebook/mms-tts-eng on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/facebook/mms-tts-eng. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/facebook/mms-tts-eng on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTextToWaveform tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-eng") model = AutoModelForTextToWaveform.from_pretrained("facebook/mms-tts-eng", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Unable to creating output file using scipy
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).