Views
No views yet
fairseq2, PyTorch, or the
original omnilingual-asr repository for inference.| Class | Label | Meaning |
|---|---|---|
| 0 | not_tts | Audio is not suitable for TTS training |
| 1 | tts | Audio is suitable for TTS training |
p_tts is the softmax probability of class 1. The default decision threshold
is 0.5. For dataset filtering, choose the threshold on a manually labeled
validation set.pip install -r requirements.txtonnxruntime with a compatible
onnxruntime-gpu build.1python inference.py sample.mp3
2python inference.py /path/to/audio-directory --provider cpu
3python inference.py sample.wav --provider cuda --cuda-device-id 01{
2 "label": "tts",
3 "predicted_class": 1,
4 "p_not_tts": 0.02,
5 "p_tts": 0.98,
6 "logits": [-2.2, 1.5]
7}1from inference import TTSSuitabilityClassifier
2
3classifier = TTSSuitabilityClassifier(provider="auto")
4result = classifier.predict("sample.mp3")
5
6print(result["label"])
7print(result["p_tts"])waveforms with shape
[batch_size, num_frames]. The output is logits with shape
[batch_size, 2]. Both input axes are dynamic; ONNX opset 17 is used.model.onnx: self-contained FP32 ONNX model.inference.py: standalone ONNX Runtime inference.requirements.txt: CPU inference dependencies.hf upload-large-folder <username>/<repo-name> . --repo-type modelmodel.onnx is configured for Git LFS in .gitattributes.workflows/recipes/wav2vec2/binary_classification/export_onnx.pyworkflows/recipes/wav2vec2/binary_classification/run_onnx.pywav2vec2_asr 300m16000 Hz160000 samplesnot_tts, tts