CoolFace
Modelpublic

panchajanya-ai/lid_Indic_Vaani

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
2likes10downloads
Model Card

🔧 Inference Example

python
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")