The modal backend for Arabic TTS Arena
27
stars
111
commits
Python
primary language
Aug 12, 2026
updated
Blind A/B voting platform for Arabic text-to-speech models. Users hear two anonymous outputs, pick the better one, and an ELO system ranks all models on a public leaderboard.
We welcome all Arabic TTS models — open-source or proprietary.
models/your_model.py with its own image:import modal
from models import BaseTTSModel, arena_cls, register_model
from app import LOCAL_MODULES
# Each model defines its own image — install only what you need
your_image = (
modal.Image.from_registry("nvidia/cuda:12.8.0-devel-ubuntu24.04", add_python="3.12")
.apt_install("ffmpeg", "libsndfile1")
.uv_pip_install("torch>=2.0.0", "numpy", "soundfile", "your-model-package")
.add_local_python_source(*LOCAL_MODULES)
)
@register_model
@arena_cls(image=your_image, gpu="T4", scaledown_window=300,
secrets=[modal.Secret.from_name("hf-ar-tts-arena")])
class YourModel(BaseTTSModel):
model_id = "your_model"
display_name = "Your Model"
model_url = "https://huggingface.co/your-org/your-model"
@modal.enter()
def load_model(self):
... # load weights once on container start
@modal.method()
def synthesize(self, text: str) -> dict:
try:
wav = ... # numpy array
return self.success_response(self.audio_to_base64(wav, 24000), 24000)
except Exception as e:
return self.error_response(e)
models/example_api_model.py and adapt it. Lightweight image, no GPU.success_response() / errors via error_response()model_id (lowercase, underscores)CI auto-deploys to Modal on merge.
Apache 2.0
Python
100.0%
The modal backend for Arabic TTS Arena
27
stars
111
commits
Python
primary language
Aug 12, 2026
updated
Blind A/B voting platform for Arabic text-to-speech models. Users hear two anonymous outputs, pick the better one, and an ELO system ranks all models on a public leaderboard.
We welcome all Arabic TTS models — open-source or proprietary.
models/your_model.py with its own image:import modal
from models import BaseTTSModel, arena_cls, register_model
from app import LOCAL_MODULES
# Each model defines its own image — install only what you need
your_image = (
modal.Image.from_registry("nvidia/cuda:12.8.0-devel-ubuntu24.04", add_python="3.12")
.apt_install("ffmpeg", "libsndfile1")
.uv_pip_install("torch>=2.0.0", "numpy", "soundfile", "your-model-package")
.add_local_python_source(*LOCAL_MODULES)
)
@register_model
@arena_cls(image=your_image, gpu="T4", scaledown_window=300,
secrets=[modal.Secret.from_name("hf-ar-tts-arena")])
class YourModel(BaseTTSModel):
model_id = "your_model"
display_name = "Your Model"
model_url = "https://huggingface.co/your-org/your-model"
@modal.enter()
def load_model(self):
... # load weights once on container start
@modal.method()
def synthesize(self, text: str) -> dict:
try:
wav = ... # numpy array
return self.success_response(self.audio_to_base64(wav, 24000), 24000)
except Exception as e:
return self.error_response(e)
models/example_api_model.py and adapt it. Lightweight image, no GPU.success_response() / errors via error_response()model_id (lowercase, underscores)CI auto-deploys to Modal on merge.
Apache 2.0
Python
100.0%