Views
No views yet
| File | Format | Size | Description |
|---|---|---|---|
lang-id-ecapa.onnx | ONNX | ~760KB | Model graph |
lang-id-ecapa.onnx.data | ONNX | ~85MB | Model weights (external data) |
lang-id-ecapa.mlpackage.tar.gz | CoreML | ~40MB | CoreML model archive (macOS) |
labels.json | JSON | <1KB | 107 ISO 639-1 language codes |
1bun install -g @drakulavich/kesha-voice-kit
2kesha install # downloads this model automatically
3kesha --json audio.ogg # transcribe + detect language1import onnxruntime as ort
2import numpy as np
3import json
4
5session = ort.InferenceSession("lang-id-ecapa.onnx")
6with open("labels.json") as f:
7 labels = json.load(f)
8
9# Input: 16kHz mono float32 waveform
10audio = np.random.randn(1, 160000).astype(np.float32) # 10 seconds
11result = session.run(None, {"waveform": audio})
12probs = result[0][0]
13
14top_idx = np.argmax(probs)
15print(f"Language: {labels[top_idx]} (confidence: {probs[top_idx]:.4f})")1use ort::session::Session;
2
3let session = Session::builder()?.commit_from_file("lang-id-ecapa.onnx")?;
4// Input: "waveform" [1, samples] float32
5// Output: "language_probs" [1, 107] float32[1, samples] float32)[1, 107] float32, softmax applied)torch.onnx.export (ONNX) and torch.export + coremltools (CoreML).