tiny-voca-arabic-v2.1-prime (PRIME-Quant & INT8 Edition)

Ultra-lightweight, 8-voice Modern Standard Arabic (ูุตุญู‰) text-to-speech model compressed with PRIME-Quant and Dynamic INT8:

  • Runs anywhere on CPU in ~1โ€“2 seconds without needing a GPU or complex dependencies.
  • 8 Natural Voices across 4 distinct styles (Assistant, News, Story, Promo).
  • Native 24 kHz Mono Audio generation with built-in number reader and automatic diacritization.

Benchmark & Compression Comparison

Model Format Checkpoint File Size SNR Compression Target Hardware
FP32 Baseline model.onnx 21.37 MB $\infty$ $1.0\times$ Standard CPU / GPU
ONNX INT8 model_int8.onnx 8.11 MB 24.1 dB 2.6ร— Fast CPU (1-command run)
PRIME-Quant P4 tiny-voca-arabic-v2.1-p4_0.pt 2.76 MB 22.48 dB 6.3ร— Ultra-compact edge / mobile
PRIME-Quant P2 tiny-voca-arabic-v2.1-p2_0.pt 1.72 MB 9.90 dB 10.1ร— Extreme embedded edge

โšก Quickstart for Beginners (1 Minute Setup)

No GPU, PyTorch, or CUDA required! Run on Linux, Mac, or Windows CPU:

1. Install Requirements

pip install onnxruntime numpy soundfile

2. Download and Run

git clone https://huggingface.co/batteryphil/tiny-voca-arabic-v2.1-prime
cd tiny-voca-arabic-v2.1-prime
python infer.py "ู…ุฑุญุจู‹ุง ุจูƒู… ููŠ ุนุงู„ู… ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ."

This generates output.wav with crystal-clear 24kHz speech!


๐ŸŽ™๏ธ Voice Selection

Choose from 8 distinct Modern Standard Arabic voices using --voice:

# Male Assistant Voice
python infer.py "ู…ุฑุญุจู‹ุงุŒ ูƒูŠู ูŠู…ูƒู†ู†ูŠ ู…ุณุงุนุฏุชูƒ ุงู„ูŠูˆู…ุŸ" --voice am6 --output assistant.wav

# Female News Anchor
python infer.py "ู†ุดุฑุฉ ุงู„ุฃุฎุจุงุฑ ุชุฃุชูŠูƒู… ู…ู† ุงู„ู‚ุงู‡ุฑุฉ." --voice nf2 --output news.wav

# Male Story Narrator
python infer.py "ูƒุงู† ูŠุง ู…ุง ูƒุงู† ููŠ ู‚ุฏูŠู… ุงู„ุฒู…ุงู†..." --voice sm3 --output story.wav

Available Voices:

Voice Code Name Delivery Style Gender Description
a000 Assistant F Conversational Female Crisp, friendly assistant (Default)
am6 Assistant M Conversational Male Natural, conversational assistant
nf2 News F News Broadcast Female Formal news anchor reading
nm2 News M News Broadcast Male Authoritative news broadcast
sf1 Story F Expressive Story Female Expressive storytelling narration
sm3 Story M Expressive Story Male Deep narrative cadence
pf4 Promo F Commercial Promo Female Energetic promotional read
pm2 Promo M Commercial Promo Male Energetic commercial announcer

๐Ÿ Python API (One-Liner)

You can import text_to_speech directly in your Python code:

from infer import text_to_speech

# Synthesize speech in 1 line
audio, sample_rate = text_to_speech(
    raw_text="ุงู„ุนู„ู… ู†ูˆุฑุŒ ูˆุงู„ุฌู‡ู„ ุธู„ุงู…. ูˆู…ู† ุฌุฏู‘ ูˆุฌุฏุŒ ูˆู…ู† ุฒุฑุน ุญุตุฏ.",
    voice="a000",
    output_path="quote.wav"
)

โš™๏ธ Advanced CLI Options

usage: infer.py [-h] [--voice VOICE] [--model {int8,fp32}] [--speed SPEED] [--pitch PITCH] [--output OUTPUT] [text]

Options:
  text                Arabic text to synthesize (auto-expands numbers)
  --voice, -v         Voice code (a000, am6, nf2, nm2, sf1, sm3, pf4, pm2)
  --model, -m         Model precision: 'int8' (fast 8MB) or 'fp32' (21MB)
  --speed, -s         Speech speed multiplier (default: 1.0)
  --pitch, -p         Pitch shift in log F0 (default: 0.0)
  --output, -o        Output WAV path (default: output.wav)

Credits & Acknowledgements

Downloads last month
30
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support