Audio Classification
Transformers
ONNX
NeMo
Safetensors
anuvani_lid
audio
speech
language-identification
spoken-language-id
lid
indic
conformer
custom_code
Instructions to use CIIL/Anuvani-LID with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIIL/Anuvani-LID with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="CIIL/Anuvani-LID", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForAudioClassification model = AutoModelForAudioClassification.from_pretrained("CIIL/Anuvani-LID", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download mobile_inference/tests/bindings/run_jvm_c_python.sh from CIIL/Anuvani-LID: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/CIIL/Anuvani-LID/resolve/main/mobile_inference/tests/bindings/run_jvm_c_python.sh
- Command line
-
hf download hf://CIIL/Anuvani-LID/mobile_inference/tests/bindings/run_jvm_c_python.sh
-
curl -L -o run_jvm_c_python.sh https://huggingface.co/CIIL/Anuvani-LID/resolve/main/mobile_inference/tests/bindings/run_jvm_c_python.sh
1.63 kB
| # Copyright (c) 2026, CIIL Anuvani-LID. Apache-2.0. | |
| # Python reference, C, Kotlin and Java binding tests, inside anuvani-lid-mobile-sherpa-linux:1 with the | |
| # repository at /work, the Linux build at /work/build/linux-x86_64/install and the gate audio at $GATE. | |
| set -e | |
| OUT=${OUT:-/work/results/tmp/bindings} | |
| MODEL=${MODEL:-/work/models/anuvani_lid.int8.onnx} | |
| VAD=${VAD:-/work/models/silero_vad_6.2.1.onnx} | |
| LONG=${LONG:-/work/results/tmp/long/mixed_0.wav} | |
| LIB=/work/build/linux-x86_64/install/lib | |
| SRC=/work/third_party/sherpa-onnx | |
| CLIPS=$(ls $GATE/golden/*.wav) | |
| mkdir -p $OUT /tmp/bt && export LD_LIBRARY_PATH=$LIB | |
| pip install --user --no-deps -q /work/build/wheels/sherpa_onnx-*.whl 2>/dev/null | |
| python3 /work/tests/bindings/python_ref.py $MODEL $VAD $LONG $CLIPS > $OUT/python.jsonl | |
| gcc -O2 -o /tmp/bt/c_test /work/tests/bindings/c/main.c -I$SRC -L$LIB -lsherpa-onnx-c-api | |
| /tmp/bt/c_test $MODEL $VAD $LONG $CLIPS > $OUT/c.jsonl | |
| K=$SRC/sherpa-onnx/kotlin-api | |
| kotlinc-jvm -include-runtime -d /tmp/bt/kotlin.jar /work/tests/bindings/kotlin/Main.kt \ | |
| $K/AudioTagging.kt $K/OfflineStream.kt $K/LidPipeline.kt $K/WaveReader.kt \ | |
| $SRC/kotlin-api-examples/faked-asset-manager.kt $SRC/kotlin-api-examples/faked-log.kt 2>/dev/null | |
| java -Djava.library.path=$LIB -cp /tmp/bt/kotlin.jar com.k2fsa.sherpa.onnx.MainKt $MODEL $VAD $LONG $CLIPS > $OUT/kotlin.jsonl | |
| mkdir -p /tmp/bt/java | |
| javac -d /tmp/bt/java $(find $SRC/sherpa-onnx/java-api/src -name "*.java") /work/tests/bindings/java/Main.java | |
| java -Djava.library.path=$LIB -cp /tmp/bt/java Main $MODEL $VAD $LONG $CLIPS > $OUT/java.jsonl | |
| echo "python, c, kotlin, java: done" | |