Instructions to use myshell-ai/MeloTTS-Spanish with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use myshell-ai/MeloTTS-Spanish with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="myshell-ai/MeloTTS-Spanish")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("myshell-ai/MeloTTS-Spanish", dtype="auto") - Notebooks
- Google Colab
- Kaggle
melo.api Error
#1
by NickyNicky - opened
hi,
!pip install --upgrade huggingface_hub -qqq
!pip install git+https://github.com/myshell-ai/MeloTTS.git -qqq
# !pip install mecab-python3
!pip install unidic-lite
!pip install --no-binary :all: mecab-python3
from melo.api import TTS
# Speed is adjustable
speed = 1.0
# CPU is sufficient for real-time inference.
# You can also change to cuda:0
# device = 'cpu'
device="cuda:0" if torch.cuda.is_available() else "cpu"
text = "El resplandor del sol acaricia las olas, pintando el cielo con una paleta deslumbrante."
model = TTS(language='ES', device=device)
speaker_ids = model.hps.data.spk2id
output_path = 'es.wav'
model.tts_to_file(text, speaker_ids['ES'], output_path, speed=speed)

