Downloads · 30 days
0
akki244/indic-conformer-onnx-int8
indic-conformer-onnx-int8 is a machine learning model from akki244. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Quantized version of AI4Bharat's Indic Conformer 600M multilingual ASR model for efficient on-device inference.
Downloads · 30 days
0
Access
Public
Updated Jan 2, 2026
Repo size
658 MB
Likes
1
Public
Click a slice to open those files.
.onnx658 MB · 100%
From the Hugging Face model README
Quantized version of AI4Bharat's Indic Conformer 600M multilingual ASR model for efficient on-device inference.
encoder_int8.onnx (622 MB) - Quantized Conformer encoder
ctc_decoder_int8.onnx (5.5 MB) - Quantized CTC decoder
vocab.json - Per-language vocabularies (257 tokens each)language_indices.json - CTC vocab masking indices for language-specific decodingmel_filters.json - Mel filterbank (257 x 80)hanning_window.json - Hanning window for STFT (400 samples)| Model | Original (FP32) | Quantized (INT8) | Reduction |
|---|---|---|---|
| Encoder | ~2.5 GB | 622 MB | ~75% |
| Decoder | ~22 MB | 5.5 MB | ~75% |
| Total | ~2.52 GB | 627.5 MB | ~75% |
import onnxruntime as ort
import numpy as np
import json
# Load models
encoder_session = ort.InferenceSession("encoder_int8.onnx")
decoder_session = ort.InferenceSession("ctc_decoder_int8.onnx")
# Load vocabularies
with open("vocab.json") as f:
vocab = json.load(f)
with open("language_indices.json") as f:
language_indices = json.load(f)
# Prepare audio features (log-mel spectrogram)
# features shape: [1, 80, T]
features = extract_mel_features(audio, sample_rate=16000)
length = np.array([[features.shape[2]]], dtype=np.int64)
# Run encoder
encoder_output = encoder_session.run(
["outputs"],
{"input": features, "length": length}
)[0]
# Run decoder
logprobs = decoder_session.run(
["logprobs"],
{"encoder_output": encoder_output}
)[0]
# Greedy CTC decoding with language-specific masking
language = "hin" # Hindi
active_indices = language_indices[language]
vocab_list = vocab[language]
transcript = ""
prev_idx = -1
for t in range(logprobs.shape[1]):
#Get argmax among active vocab indices
scores = logprobs[0, t, active_indices]
max_idx = np.argmax(scores)
# CTC deduplication
if max_idx != 256 and max_idx != prev_idx: # 256 is blank
transcript += vocab_list[max_idx]
prev_idx = max_idx
print(transcript)
23 Indian languages including Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia, Assamese, Sanskrit, Urdu, Dogri, Konkani, Maithili, Manipuri, Nepali, Santali, and Sindhi.
Audio (16kHz)
↓
Mel Spectrogram (80 bins)
↓
Conformer Encoder (24 layers, 600M params)
↓ [1, 1024, T_sub]
CTC Decoder
↓ [1, T_sub, 5633]
Language-specific masking
↓
Greedy/Beam Search
↓
Transcription
Tested on Android (Pixel 7):
@article{conformer2023,
title={Scaling Speech Technology to 1000+ Languages},
author={AI4Bharat},
journal={arXiv preprint},
year={2023}
}
AI4Bharat - IIT Madras
Original model: https://huggingface.co/ai4bharat/indic-conformer-600m-multilingual
Same as original model (check AI4Bharat's repository for licensing terms)
Quantized for mobile deployment | January 2026