metadata
title: شَمْل - Arabic Diacritization
emoji: 🎙️
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
short_description: Arabic speech-to-text + diacritization
شَمْل (Lisan / Shaml) — Arabic Diacritization
AI-powered Arabic diacritization platform combining:
- Whisper ASR for Classical Arabic speech-to-text
- Diac (NAACL 2024) transformer for restoring tashkeel
- FastAPI backend serving a React (Vite) frontend
- Optional Supabase persistence for audio + text records
Workflow
- Record or upload an Arabic audio clip
- Whisper transcribes it
- Edit the transcription if needed
- Diac restores diacritics on the edited text
- (Optional) Save the audio + texts to Supabase
Environment Variables (Secrets)
Set the following as Repository Secrets in the Space settings (not Variables):
SUPABASE_URL— your Supabase project URLSUPABASE_SERVICE_ROLE_KEY— backend-only secret (never expose client-side)
Optional:
API_KEY— protect the API behind a header (X-API-Key)MODEL_NAME— override default Hugging Face Diac modelASR_MODEL_NAME— override default Whisper modelCORS_ORIGINS— comma-separated allowed origins (default permissive)
Resources
- Free tier: 2 vCPU / 16 GB RAM / 50 GB disk (non-persistent)
- First boot downloads Whisper + Diac models from Hugging Face (~3-4 GB)
- Subsequent boots use cached models
API
GET /api/— service infoGET /api/health— model & Supabase statusPOST /api/transcribe/audio— Whisper transcriptionPOST /api/diacritize— text diacritizationPOST /api/diacritize/audio— one-shot audio → diacritized textPOST /api/records/save— save to SupabaseGET /docs— interactive OpenAPI
Credits
Based on the NAACL 2024 paper:
Shatnawi, S., Alqahtani, S., Aldarmaki, H. (2024). Automatic Restoration of Diacritics for Speech Data Sets.