Quds-v4-onnx
🚨 Non Commercial Usage Only
💡 Fine-tuned specifically for the domain of Islamic lectures and specialized Hawza courses, such as Tafsir, Fiqh, Usul, and Rijal.
🔔
FOR NeMo version (includes both rnnt and ctc decoders and word timestamps) send a request in Community
Model Details
- Model Name: Quds-v4-onnx
- Model Type: Automatic Speech Recognition (ASR) / Speech-to-Text
- Architecture: NeMo FastConformer Large Hybrid (RNN-T variant)
- Format: ONNX (Open Neural Network Exchange)
- Language: Persian (Farsi)
Model Description
Quds-v4-onnx is a highly accurate Persian Automatic Speech Recognition model. It is based on the robust NeMo FastConformer Large Hybrid architecture and is specifically exported in the ONNX format to enable fast, cross-platform inference. This release features an RNN-T (Recurrent Neural Network Transducer) decoder.
Performance & Accuracy
- The model achieves very high accuracy on standard, formal Persian speech.
Training Details
- Training Dataset: The model was trained on a high-quality, non-public (private) dataset.
- Dataset Size: 600 hours of audio data.
Usage
This model can be used seamlessly with the onnx-asr Python library, which provides a clean interface for ONNX-based ASR models.
Installation
First, install the onnx-asr package:
1. Basic Inference (Single File)
Load the model directly from Hugging Face and transcribe a .wav file:
1import onnx_asr
2
3# Load the model from Hugging Face
4model = onnx_asr.load_model("hojreh/Quds-v4-onnx")
5
6# Recognize speech from a single WAV file
7transcription = model.recognize("test.wav")
8print(transcription)
2. Batch Processing
You can pass a list of file paths to process multiple audio files efficiently in a single batch:
1import onnx_asr
2
3model = onnx_asr.load_model("hojreh/Quds-v4-onnx")
4transcriptions = model.recognize(["test1.wav", "test2.wav", "test3.wav"])
5print(transcriptions)
3. Long audios (VAD Integration)
For long audio files, you can integrate a VAD model (such as Silero) to skip non-speech segments:
1import onnx_asr
2
3# Load a VAD model
4vad = onnx_asr.load_vad("onnx-community/pyannote-segmentation-3.0") # or "silero"
5
6# Attach VAD to the ASR model
7model = onnx_asr.load_model("hojreh/Quds-v4-onnx").with_vad(vad)
8
9# Recognize with VAD (returns segmented results)
10for res in model.recognize("test.wav"):
11 print(res)
4. Timestamps
1import onnx_asr
2model = onnx_asr.load_model("hojreh/Quds-v4-onnx").with_timestamps()
3print(model.recognize("test1.wav"))
5. Quantized version (INT8)
Quantized version (INT8) is smaller but NOT accurate as main version.
1import onnx_asr
2model = onnx_asr.load_model("hojreh/Quds-v4-onnx", quantization="int8")
3print(model.recognize("test1.wav"))
6. Command Line Interface (CLI)
The onnx-asr package also includes a simple CLI for quick testing directly from your terminal:
1# Run transcription on a wav file
2onnx-asr hojreh/Quds-v4-onnx test.wav
(For full CLI parameters and options, run onnx-asr -h in your terminal)
Limitations
- Dialect Sensitivity: Due to training on standard Persian audio, the model struggles with heavy regional accents, colloquialisms, and non-standard dialects of Persian.
- Audio Quality Sensitivity: As with most ASR models, performance degrades in highly noisy environments.
- Domain Specificity: The model may not be perfectly suited for highly specialized technical or medical domains.