Downloads · 30 days
14
1% of all-time downloads
ImhotepAI/yoruba-tts
yoruba-tts is a text-to-speech model from ImhotepAI. Use it when you need text read aloud. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
Downloads · 30 days
14
1% of all-time downloads
All-time downloads
1.7K
Public
Repo size
2.9 GB
Likes
2
Public
Click a slice to open those files.
.bin578 MB · 100%
From the Hugging Face model README
# Load model directly
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
from huggingface_hub import hf_hub_download
import torch
processor = SpeechT5Processor.from_pretrained("imhotepai/yoruba-tts")
model = SpeechT5ForTextToSpeech.from_pretrained("imhotepai/yoruba-tts")
dir_= hf_hub_download(repo_id="imhotepai/yoruba-tts", filename="speaker_embeddings.pt")
speaker_embeddings= torch.load(dir_)
text='Báwó ni'.lower()
inputs = processor(text=text, return_tensors="pt")
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
# Audio in notebook
from IPython.display import Audio
Audio(speech.numpy(), rate=16000)