Spaces:
Build error
Build error
A newer version of the Streamlit SDK is available: 1.57.0
metadata
title: Arabic TTS (MMS)
emoji: 🗣️
colorFrom: indigo
colorTo: green
sdk: streamlit
sdk_version: 1.38.0
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Arabic TTS Streamlit App
Arabic text-to-speech demo powered by open-source Hugging Face checkpoints:
facebook/mms-tts-ara(MMS Modern Standard Arabic)wasmdashai/vits-ar-sa-A(community VITS Saudi Arabic voice)MBZUAI/speecht5_tts_clartts_ar(SpeechT5 CLAra for Classical Arabic)AhmedEladl/saudi-tts(community Saudi Arabic TTS model)
Features
- Local inference for MMS, community VITS, SpeechT5, and XTTS engines (GPU-aware via PyTorch)
- Sidebar model download button for caching checkpoints under
models_cache/ - Downloadable
app.logfor easy debugging/support - Hugging Face token input if you later add hosted models requiring authentication
Prerequisites
sudo apt-get update && sudo apt-get install -y python3-venv espeak-ng
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Optional: Install PyTorch w/ CUDA
Pick the command for your driver from https://pytorch.org/get-started/locally/
Example (CUDA 12.1):
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
CPU-only fallback:
pip install torch --index-url https://download.pytorch.org/whl/cpu
Run the App
streamlit run app.py
Open the printed URL (usually http://localhost:8501).
Using the UI
- Pick an Arabic model in the sidebar.
- Expand Model assets to download weights locally (recommended for MMS/VITS/SpeechT5).
- Enter Arabic text and click 🔊 Generate Speech.
- Download
app.logfrom the sidebar if you need to inspect or share errors.
Troubleshooting
StopIterationfrom hosted inference: current models run locally only.- Message "النص المدخل لم ينتج أي رموز…": the tokenizer stripped everything. Add Arabic letters or a longer phrase.
- SpeechT5 downloads HiFi-GAN + CMU x-vectors the first time; keep the tab open.
- SpeechT5 also requires
sentencepiece(already listed inrequirements.txt). If you see an import error, re-runpip install sentencepieceand restart the app. - For
AhmedEladl/saudi-tts(XTTS-style), provide local paths in the sidebar:config.json,vocab.json, the checkpoint directory containing the.pthfile, and aspeaker.wav. If you don't have the Coqui TTS library installed, runpip install TTS. - CUDA OOM: shorten the text input or set
CUDA_VISIBLE_DEVICES=""to force CPU inference.
License
- Each Hugging Face model keeps its own license; review before redistribution.
- App scaffolding may be reused freely in your projects.