Project Astitva
Collection
MT, ASR & TTS models for Bhili (ΰ€ΰ₯ΰ€²ΰ₯), specifically the Dehvali Bhili dialect, an Indo-Aryan language spoken by the Bhil community in western India. β’ 5 items β’ Updated β’ 1
The ONNX version of the Automatic Speech Recognition (ASR) model for Bhili (ΰ€ΰ₯ΰ€²ΰ₯), specifically the Dehvali Bhili dialect, an Indo-Aryan language spoken by the Bhil community in western India. The NeMo version of the model can be found here. Try out the model here!
pip install transformers torch torchaudio onnxruntime huggingface_hub
from transformers import AutoModel
import torchaudio
model = AutoModel.from_pretrained(
"ai4bharat/bhili-asr-onnx",
trust_remote_code=True
)
wav, sr = torchaudio.load("audio.wav")
if sr != 16000:
wav = torchaudio.transforms.Resample(sr, 16000)(wav)
if wav.shape[0] > 1:
wav = wav.mean(dim=0, keepdim=True)
text = model(wav, "mr", "ctc")
print(text)
import torch
from transformers import AutoModel
print(f"Using: {'CUDA' if torch.cuda.is_available() else 'CPU'}")
model = AutoModel.from_pretrained(
"ai4bharat/bhili-asr-onnx",
trust_remote_code=True
)
text = model(wav, "mr", "ctc")
Bhili does not currently have a dedicated tokenizer in the IndicConformer modelβs supported language set.
We use the Marathi (mr) tokenizer as the closest alternative, since both languages use the Devanagari script.
bhili-asr-onnx/
βββ config.json
βββ model_onnx.py # HuggingFace inference wrapper
βββ README.md
βββ assets/
βββ preprocessor.ts # Audio preprocessing (TorchScript)
βββ encoder.onnx # Conformer encoder (fine-tuned)
βββ ctc_decoder.onnx # CTC projection layer
βββ rnnt_decoder.onnx # RNN-T prediction network
βββ joint_enc.onnx # Joint network encoder projection
βββ joint_pred.onnx # Joint network prediction projection
βββ joint_pre_net.onnx # Joint pre-network
βββ joint_post_net_*.onnx # Language-specific post networks
βββ vocab.json # Tokenizer vocabulary
βββ language_masks.json # Per-language vocabulary masks
Base model
ai4bharat/indic-conformer-600m-multilingual