Model Overview:
open-vakgyata is an open-source language identification model capable of detecting and classifying indian languages from speech inputs.
1import torchaudio
23audio, sr = torchaudio.load("path/to/audio.wav")45# Process the waveform and move to the appropriate device6inputs = processor(audio.flatten(), sampling_rate=sr, return_tensors="pt").to(device)78# Perform inference9with torch.no_grad():10 logits = model(**inputs).logits
1112# Get language probabilities13probs = logits.softmax(dim=-1).cpu().numpy()14language = model.config.id2label.get(probs.argmax())1516print(language)
Citation
If you use this model in your research or application, please consider citing the model and its base source:
@misc{vakgyata2024,
title={vakgyata: Language Identification for Indian Speech},
author={OneCXI},
year={2024},
url={https://huggingface.co/onecxi/open-vakgyata}
}