metadata
license: apache-2.0
language:
- en
- hi
- ta
- te
- mr
base_model:
- speechbrain/lang-id-commonlanguage_ecapa
pipeline_tag: audio-classification
library_name: speechbrain
🔧 Inference Example
from speechbrain.inference.classifiers import EncoderClassifier
import time
# Load the model from Hugging Face
classifier = EncoderClassifier.from_hparams(
source="panchajanya-ai/lid_Indic_Vaani",
run_opts={"device": "cuda"} # use "cpu" if CUDA is not available
)
# Start timer
start_time = time.time()
# Run classification on an audio file
out_prob, score, index, text_lab = classifier.classify_file("sample_audio.wav")
# End timer
end_time = time.time()
# Print results
print("Probabilities:", out_prob)
print("Score:", score)
print("Index:", index)
print("Label:", text_lab)
print("Time taken:", end_time - start_time, "seconds")