Downloads · 30 days
0
Shrey160/hinglish-turn-v2
hinglish-turn-v2 is a audio classification model from Shrey160. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as mit.
Tiny audio-native turn detector for Hinglish (Hindi–English code-mixed) telephony speech: given up to 8 s of audio, is the user done speaking (complete → agent can respond) or just pausing (incomplete → keep listening…
Downloads · 30 days
0
Access
Public
Updated Aug 29, 2026
Repo size
73.5 MB
Likes
0
Public
Click a slice to open those files.
.onnx41.4 MB · 56%
From the Hugging Face model README
Tiny audio-native turn detector for Hinglish (Hindi–English code-mixed) telephony speech: given up to 8 s of audio, is the user done speaking (complete → agent can respond) or just pausing (incomplete → keep listening)? Two-stage fine-tune of the Smart Turn v3.2 approach for the language pair it skipped.
| Model | test-A (v3.2-test hin+eng, 1,200) | test-B (TTS Hinglish, 33) | test-C (MUCS real speech, 846) |
|---|---|---|---|
| Smart Turn v3.2 zero-shot | 0.927 / 0.930 | 0.788 / 0.759 | 0.539 / 0.573 |
| v2 s2-004 (this model) | 0.882 / 0.886 | 0.970 / 0.968 | 0.600 / 0.446 |
(acc / F1). The intended story: the baseline wins on its own training distribution; the Hinglish fine-tune wins on Hinglish domains. int8 variant: −2.5 / −3.0 (1 clip) / +0.4 acc, 9.05 MB, p50 ~13 ms CPU. Policy (P6 sweep): τ=0.5 default; knee τ≈0.45; test-B flat τ 0.25–0.85. Trailing context: accuracy saturates at ~4 s (test-A) / 2 s (test-B).
chunk_length=8
WITHOUT per-bin normalization (do_normalize=False). The v2 models were
trained and exported self-consistently on unnormalized mels (transformers 5
silently dropped the FE default). Do NOT enable normalization at inference.import numpy as np, onnxruntime as ort, soundfile as sf
from huggingface_hub import hf_hub_download
from transformers import WhisperFeatureExtractor
fe = WhisperFeatureExtractor.from_pretrained("openai/whisper-tiny", chunk_length=8)
sess = ort.InferenceSession(hf_hub_download("Shrey160/hinglish-turn-v2", "onnx/s2-004.fp32.onnx"))
audio, sr = sf.read("clip.wav", dtype="float32") # resample to 16 kHz mono first
feats = fe(audio, sampling_rate=16000, return_tensors="np", padding="max_length",
max_length=8 * 16000, truncation=True, do_normalize=False)["input_features"]
logit = sess.run(None, {sess.get_inputs()[0].name: feats.astype(np.float32)})[0].reshape(-1)[0]
p_complete = 1 / (1 + np.exp(-logit))