codewithmoin commited on
Commit
240cf26
·
verified ·
1 Parent(s): 51550c3

ONNX models + card

Browse files
Files changed (3) hide show
  1. README.md +69 -0
  2. smart_turn_4s.onnx +3 -0
  3. smart_turn_8s.onnx +3 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: [en, hi]
3
+ license: bsd-2-clause
4
+ tags:
5
+ - turn-detection
6
+ - endpointing
7
+ - voice-activity-detection
8
+ - audio-classification
9
+ - hinglish
10
+ - onnx
11
+ pipeline_tag: audio-classification
12
+ ---
13
+
14
+ # Smart Turn Hinglish (whisper-tiny)
15
+
16
+ Audio-only turn detection for voice agents: has the speaker **finished their turn**, or are
17
+ they just pausing? Built for English + Hindi/Hinglish from the
18
+ [pipecat smart-turn-v3.2](https://huggingface.co/datasets/pipecat-ai/smart-turn-data-v3.2-train)
19
+ data. ~7.8M params. The ONNX graph takes a raw 16k waveform and returns `P(turn complete)`,
20
+ with the log-mel frontend baked in, so inference needs only `onnxruntime` + `numpy`.
21
+
22
+ **Code, training, ablations and the full write-up:**
23
+ [github.com/CodeWithMoin/smart-turn-hinglish](https://github.com/CodeWithMoin/smart-turn-hinglish)
24
+
25
+ ## Files
26
+
27
+ | file | window | notes |
28
+ |---|---|---|
29
+ | `smart_turn_8s.onnx` | 8s | shipped model. accuracy pick, ~38 ms/clip CPU |
30
+ | `smart_turn_4s.onnx` | 4s | fast variant, ~17 ms/clip CPU |
31
+
32
+ ## Results (official frozen `smart-turn-v3.2-test`, accuracy @ 0.5)
33
+
34
+ | | this model (8s) | Smart Turn v3.2 |
35
+ |---|---|---|
36
+ | Hindi | **93.9%** | 92.8% |
37
+ | English | 93.7% | 94.7% |
38
+ | Human / real | 94.4% | 95.5% |
39
+
40
+ Beats the reference on Hindi and sits within a point on English, at a fraction of the size.
41
+ Overall test AUC 0.983.
42
+
43
+ ## Usage
44
+
45
+ ```python
46
+ import numpy as np, onnxruntime as ort
47
+
48
+ sess = ort.InferenceSession("smart_turn_8s.onnx", providers=["CPUExecutionProvider"])
49
+
50
+ def p_turn_complete(wav_16k): # float32 mono @ 16 kHz
51
+ x = wav_16k[-128000:] # last 8s
52
+ buf = np.zeros((1, 128000), np.float32)
53
+ buf[0, 128000 - len(x):] = x # right-align (left-pad with silence)
54
+ return float(sess.run(None, {"waveform": buf})[0][0])
55
+ ```
56
+
57
+ In a live agent, run a cheap VAD (e.g. Silero) continuously; on a ~200 ms pause, call this on
58
+ the last 8s. Threshold `P(complete)` — higher = more patient (fewer interruptions).
59
+
60
+ ## Limitations
61
+
62
+ Trained mostly on synthetic TTS. Real casual conversational speech on a laptop/phone mic is
63
+ out of distribution and where it's weakest. See the report for the honest failure analysis
64
+ and the plan (real Indian-mic conversational data) to close it.
65
+
66
+ ## Provenance
67
+
68
+ Fine-tuned from `openai/whisper-tiny` on the openly published pipecat smart-turn-v3.2 corpus.
69
+ For commercial use, check the upstream terms.
smart_turn_4s.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39736bc2c4a1ff303d3bd6c54ac648d175f921624e232680c3e097e0e46bb966
3
+ size 31297845
smart_turn_8s.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1788037b2d623484d70cbfa0a4e96adde965adbb53b1a5fb28749123e7f660c
3
+ size 31612757