Downloads · 30 days
57
6% of all-time downloads
mussacharles60/swahili-tts-female-voice
swahili-tts-female-voice is a text-to-speech model from mussacharles60. Use it when you need text read aloud. It is set up for transformers. The card lists the license as mit.
Swahili female voice text-to-speech model
Downloads · 30 days
57
6% of all-time downloads
All-time downloads
936
Public
Parameters
36.3M
145 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors145 MB · 100%
From the Hugging Face model README
Swahili female voice text-to-speech model
This is a continuous development of text-to-speech model for female voice using Swahili language
Please give it a try
for inference try the following
# import all required libraries
from transformers import VitsModel, AutoTokenizer
import torch
import numpy as np
import scipy.io.wavfile
# Load model and tokenizer
model = VitsModel.from_pretrained("mussacharles60/swahili-tts-female-voice")
tokenizer = AutoTokenizer.from_pretrained("mussacharles60/swahili-tts-female-voice")
# Running the TTS
text = "Mambo vipi ?, Hii ni Myssa Tech sauti ya A.I, kujaribishwa na Mussa Charles"
inputs = tokenizer(text, return_tensors="pt")
# Generate waveform
with torch.no_grad():
output = model(**inputs).waveform
# Convert PyTorch tensor to NumPy array
output_np = output.squeeze().cpu().numpy()
# Write to WAV file
scipy.io.wavfile.write("female_voice_test.wav", rate=model.config.sampling_rate, data=output_np)
You're all welcome to contribute.
Thanks 🤗