Downloads · 30 days
6
5% of all-time downloads
azeddinShr/Spark-TTS-Arabic-Complete
Spark-TTS-Arabic-Complete is a text-to-speech model from azeddinShr. Use it when you need text read aloud. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned version of SparkAudio/Spark-TTS-0.5B specialized for Arabic text-to-speech synthesis. The LLM component has been fine-tuned on the ClArTTS dataset (Classical Arabic Text-to-Speech corpus) containing 12 hour…
Downloads · 30 days
6
5% of all-time downloads
All-time downloads
117
Public
Repo size
17.6 GB
Likes
4
Public
Click a slice to open those files.
.pt10.5 GB · 55%
From the Hugging Face model README
Fine-tuned version of SparkAudio/Spark-TTS-0.5B specialized for Arabic text-to-speech synthesis. The LLM component has been fine-tuned on the ClArTTS dataset (Classical Arabic Text-to-Speech corpus) containing 12 hours of high-quality single-speaker recordings.
Spark-TTS is a neural text-to-speech system that combines a language model (Qwen2) with a neural audio codec (BiCodec) for high-quality speech synthesis. This version has been specifically optimized for Arabic through fine-tuning on Classical Arabic speech data.
Architecture Components:
What Changed: Only the LLM component was fine-tuned. The audio tokenizer and speech encoder remain identical to the base model, ensuring compatibility with the original Spark-TTS architecture.
Key Features:
Can be further fine-tuned for:
Not recommended for:
🚨 Very Important Note: This model requires the official Spark-TTS repository for inference. The model files alone are not sufficient - you must clone the Spark-TTS repo and use their inference pipeline.
First, clone the official Spark-TTS repository (required for inference):
# Clone Spark-TTS
git clone https://github.com/SparkAudio/Spark-TTS
cd Spark-TTS
# Install dependencies
pip install transformers soundfile huggingface_hub omegaconf torch
from huggingface_hub import snapshot_download
# Download the fine-tuned model
model_dir = snapshot_download(
repo_id="azeddinShr/Spark-TTS-Arabic-Complete",
local_dir="./arabic_model"
)
import sys
import torch
import soundfile as sf
# Add Spark-TTS to path
sys.path.insert(0, './cli')
# Import SparkTTS class
from SparkTTS import SparkTTS
# Initialize device
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f"Using device: {device}")
# Load the fine-tuned Arabic model
tts = SparkTTS("./arabic_model", device)
print("✅ Model loaded successfully!")
# Prepare input text (must include diacritics)
text = "مَرْحَبًا بِكُمْ فِي نَمُوذَجِ تَحْوِيلِ النَّصِّ إِلَى كَلَامٍ بِاللُّغَةِ الْعَرَبِيَّةِ."
# Reference audio and its transcript
reference_audio = "path/to/reference.wav" # 5-30 seconds of clear Arabic speech
reference_text = "النَّصُّ الْمُطَابِقُ لِلصَّوْتِ الْمَرْجِعِيِّ"
# Generate speech
wav = tts.inference(
text,
prompt_speech_path=reference_audio,
prompt_text=reference_text
)
# Save output
sf.write("output.wav", wav, samplerate=16000)
print("✅ Audio generated!")
# Generate with custom parameters
wav = tts.inference(
text,
prompt_speech_path=reference_audio,
prompt_text=reference_text,
temperature=0.8, # Controls randomness (0.1-1.5, default: 0.8)
top_k=50, # Top-k sampling (default: 50)
top_p=0.95 # Nucleus sampling (default: 0.95)
)
sf.write("output_custom.wav", wav, samplerate=16000)
Example:
Dataset: MBZUAI/ClArTTS
Fine-tuning Framework: Axolotl + LoRA
Training Configuration:
Base Model: SparkAudio/Spark-TTS-0.5B (LLM component only)
Fine-tuning Method: Full fine-tuning (not LoRA)
Epochs: 20
Batch Size: 8 (1 per device × 8 gradient accumulation)
Learning Rate: 2e-4
Optimizer: AdamW (torch fused)
LR Scheduler: Cosine
Warmup Steps: 10
Sequence Length: 1024
Precision: bfloat16
Gradient Checkpointing: Enabled
Data Processing:
[text, semantic_tokens] created for LLM trainingTraining Infrastructure:
Data Preparation Steps:
# 1. Load ClArTTS from HuggingFace
# 2. Resample audio from 40.1 kHz → 24 kHz
# 3. Extract semantic tokens using BiCodec
# 4. Create metadata: [audio_path, text]
# 5. Generate training pairs: [text → semantic_tokens]
Base Model:
@misc{sparktts2024,
title={Spark-TTS: Zero-Shot Multi-Style Text-to-Speech via Large Language Models},
author={SparkAudio Team},
year={2024},
url={https://github.com/SparkAudio/Spark-TTS}
}
Training Dataset:
@inproceedings{kulkarni2023clartts,
author={Ajinkya Kulkarni and Atharva Kulkarni and Sara Shatnawi and Hanan Aldarmaki},
title={ClArTTS: An Open-Source Classical Arabic Text-to-Speech Corpus},
year={2023},
booktitle={INTERSPEECH 2023},
pages={5511--5515},
doi={10.21437/Interspeech.2023-2224}
}
Apache 2.0 (same as base model)
For questions, collaboration, or support:
Note: This model requires the official Spark-TTS repository for inference. The model files alone are not sufficient - you must clone the Spark-TTS repo and use their inference pipeline.