Views
No views yet
1# Basic usage
2python supertonic_inference.py --text "Hello world" --voice M1 -o output.wav
3
4# With specific seed for reproducibility
5python supertonic_inference.py \
6 --text "Your text here" \
7 --voice F1 \
8 --seed 42 \
9 --output output.wav--seed for consistent outputs1# Generate 10 calibration samples for quantization and accuracy validation
2python generate_calibration_data.py
3
4# Validate QNN model accuracy against ONNX reference
5python validate_qnn_accuracy.py \
6 --calibration-dir calibration_data \
7 --qnn-dir qnn_outputs \
8 --report accuracy_report.jsonmodel/
├── onnx/
│ ├── text_encoder.onnx
│ ├── duration_predictor.onnx
│ ├── vector_estimator.onnx
│ ├── vocoder.onnx
│ ├── tts.json
│ └── unicode_indexer.json
└── voice_styles/
├── F1.json ... F5.json (Female voices)
└── M1.json ... M5.json (Male voices)| Option | Description | Default |
|---|---|---|
--text, -t | Text to synthesize | Required |
--voice, -v | Voice style (F1-F5, M1-M5) | M1 |
--lang, -l | Language (en, ko, es, pt, fr) | en |
--output, -o | Output WAV file path | output/output.wav |
--steps | Diffusion steps (more = better) | 10 |
--speed | Speech speed multiplier | 1.0 |
--seed | Random seed (for reproducibility) | None |
--quiet, -q | Suppress progress messages | False |
1python supertonic_inference.py \
2 --text "The weather is nice today." \
3 --voice F1 \
4 --output weather.wav1python supertonic_inference.py \
2 --text "Important announcement." \
3 --voice M1 \
4 --steps 20 \
5 --seed 42 \
6 --output announcement.wav1python supertonic_inference.py \
2 --text "Quick update message." \
3 --voice F2 \
4 --speed 1.2 \
5 --output quick.wav1python supertonic_inference.py \
2 --text "Hola mundo" \
3 --lang es \
4 --voice M3 \
5 --output spanish.wav| Code | Type | Description |
|---|---|---|
| F1-F5 | Female | 5 distinct female voices |
| M1-M5 | Male | 5 distinct male voices |
en - Englishko - Koreanes - Spanishpt - Portuguesefr - French1from supertonic_inference import SupertonicTTS, save_wav
2
3# Initialize
4tts = SupertonicTTS(model_dir="model/onnx")
5
6# Synthesize
7waveform, duration = tts.synthesize(
8 text="Hello world",
9 voice_name="M1",
10 lang="en",
11 diffusion_steps=10,
12 speed=1.0,
13 seed=42
14)
15
16# Save
17save_wav("output.wav", waveform, tts.sample_rate)supertonic2-qualcomm/
├── supertonic_inference.py # Main inference script
├── README.md # This file
├── model/
│ ├── onnx/ # ONNX models
│ └── voice_styles/ # Voice embeddings
├── inputs/ # Test inputs
└── output/ # Generated audio