Downloads · 30 days
11
8% of all-time downloads
uetuluk2/MiraTTS-onnx-int4
MiraTTS-onnx-int4 is a text-to-speech model from uetuluk2. Use it when you need text read aloud. The card lists the license as cc-by-nc-sa-4.0.
This is an INT4 quantized ONNX version of YatharthS/MiraTTS, optimized for efficient CPU and GPU inference using ONNX Runtime with the GenAI extension.
Downloads · 30 days
11
8% of all-time downloads
All-time downloads
130
Public
Repo size
891 MB
Likes
1
Public
Click a slice to open those files.
.data876 MB · 98%
From the Hugging Face model README
This is an INT4 quantized ONNX version of YatharthS/MiraTTS, optimized for efficient CPU and GPU inference using ONNX Runtime with the GenAI extension.
| Property | Value |
|---|---|
| Original Model | YatharthS/MiraTTS |
| Quantization | INT4 (4-bit weights) |
| Format | ONNX with GenAI extension |
| Size | ~857 MB |
| Sample Rate | 48 kHz |
pip install onnxruntime-genai torch soundfile
For GPU support:
pip install onnxruntime-genai-cuda torch soundfile
from huggingface_hub import snapshot_download
from mira.model import MiraTTS
import soundfile as sf
# Download model
model_path = snapshot_download("uetuluk2/MiraTTS-onnx-int4")
# Load model (use device="cuda" for GPU)
tts = MiraTTS(model_path, device="cpu")
# Encode reference audio for voice cloning
context = tts.encode_audio("reference.wav")
# Generate speech
audio = tts.generate("Hello, this is a test!", context)
# Save output
sf.write("output.wav", audio.cpu().numpy(), 48000)
git clone https://github.com/uetuluk/MiraTTS-onnx
cd MiraTTS-onnx
pip install -e .
# Download model
huggingface-cli download uetuluk2/MiraTTS-onnx-int4 --local-dir ./models/int4
# Run example
python examples/generate_int4.py --text "Hello world!" --reference your_voice.wav
Tested on various hardware configurations:
| Device | Generation Speed | Memory |
|---|---|---|
| CPU (Intel i7) | ~0.5x realtime | ~1.5 GB RAM |
| GPU (RTX 3080) | ~10x realtime | ~1 GB VRAM |
This model was quantized using onnxruntime-genai with INT4 weight quantization:
python -m onnxruntime_genai.models.builder \
-m YatharthS/MiraTTS \
-e cpu \
-p int4 \
-o ./mira_onnx_int4
This model inherits the CC BY-NC-SA 4.0 license from the original MiraTTS model.