"""
**Smaller models should have lower quality but show no significant quality loss in checks.

Usage:

1. Install dependencies:
   sudo apt-get install portaudio19-dev
   pip install kokoro-onnx sounddevice
2. Download a model (choose one):
   - INT8 (88MB):
     wget https://github.com/taylorchu/kokoro-onnx/releases/download/v0.1.0/kokoro-quant-convinteger.onnx
   - FP16 (169MB):
     wget https://github.com/taylorchu/kokoro-onnx/releases/download/v0.1.0/kokoro-quant.onnx
3. Download voices.json:
   wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/voices.json
4. Run example:
   python examples/with_quant.py <chosen_model>
"""

import sounddevice as sd
from kokoro_onnx import Kokoro
import sys

kokoro = Kokoro(sys.argv[1], "voices.json")
samples, sample_rate = kokoro.create(
    "Hello. This audio generated by kokoro!", voice="af_sarah", speed=1.0, lang="en-us"
)
print("Playing audio...")
sd.play(samples, sample_rate)
sd.wait()
