Downloads · 30 days
5
1% of all-time downloads
AhmedEladl/saudi-tts
saudi-tts is a text-to-speech model from AhmedEladl. Use it when you need text read aloud. The card lists the license as apache-2.0.
A high-quality Text-to-Speech model for Saudi Arabic dialect.
Downloads · 30 days
5
1% of all-time downloads
All-time downloads
335
Public
Repo size
5.6 GB
Likes
21
Public
Click a slice to open those files.
.pth5.6 GB · 100%
From the Hugging Face model README
A high-quality Text-to-Speech model for Saudi Arabic dialect.
pip install git+https://github.com/coqui-ai/TTS
pip install transformers
pip install deepspeed
import os
import torch
import torchaudio
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
CONFIG_FILE_PATH = 'path/to/config.json'
VOCAB_FILE_PATH = 'path/to/vocab.json'
MODEL_PATH = 'path/to/model'
SPEAKER_AUDIO_PATH = 'path/to/speaker.wav'
print("Loading model...")
config = XttsConfig()
config.load_json(CONFIG_FILE_PATH)
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir=MODEL_PATH, use_deepspeed=True, vocab_path=VOCAB_FILE_PATH)
model.cuda()
print("Computing speaker latents...")
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(audio_path=[SPEAKER_AUDIO_PATH])
from IPython.display import Audio, display
text = ".هذا مثال على النص العربي باللهجة السعودية"
print("Inference...")
out = model.inference(
text,
"ar",
gpt_cond_latent,
speaker_embedding,
temperature=0.75,
)
AUDIO_OUTPUT_PATH = "path/to/output_audio.wav"
torchaudio.save("tts_audio.wav", torch.tensor(out["wav"]).unsqueeze(0), 24000)
display(Audio(AUDIO_OUTPUT_PATH, autoplay=True))
config.json - Model configurationvocab.json - Vocabulary filespeaker.wav - Reference speaker audiomodel.pth - Model weights@misc{eladl-sauditts,
author = {Ahmed Eladl},
title = {Saudi TTS: A High-Quality Text-to-Speech Model for Saudi Arabic Dialect},
year = {2025},
url = {https://huggingface.co/AhmedEladl/saudi-tts}
}