Aller au contenu
ModelPrésentéExterne
Télécharger

SpeechBrain Coreml

Pre-converted speechbrain/lang-id-voxlingua107-ecapa model for spoken language identification. Supports 107 languages from audio.

TypeOtherModèle de basespeechbrain/lang-id-voxlingua107-ecapaVersionLang id ecapaUnratedClasse

Source du modèle

Type
Other
Taille du fichier
742 KB
Modèle de base
speechbrain/lang-id-voxlingua107-ecapa
Version
vLang id ecapa
Mis à jour
5 nov. 2026
Source
Hugging Face

Description de la source

SpeechBrain ECAPA-TDNN — ONNX + CoreML

Pre-converted speechbrain/lang-id-voxlingua107-ecapa model for spoken language identification. Supports 107 languages from audio.

Converted for use with Kesha Voice Kit — open-source voice toolkit.

Files

FileFormatSizeDescription
lang-id-ecapa.onnxONNX~760KBModel graph
lang-id-ecapa.onnx.dataONNX~85MBModel weights (external data)
lang-id-ecapa.mlpackage.tar.gzCoreML~40MBCoreML model archive (macOS)
labels.jsonJSON<1KB107 ISO 639-1 language codes

Usage with Kesha Voice Kit

bun install -g @drakulavich/kesha-voice-kit
kesha install          # downloads this model automatically
kesha --json audio.ogg # transcribe + detect language

Usage with ONNX Runtime (Python)

import onnxruntime as ort
import numpy as np
import json

session = ort.InferenceSession("lang-id-ecapa.onnx")
with open("labels.json") as f:
    labels = json.load(f)

# Input: 16kHz mono float32 waveform
audio = np.random.randn(1, 160000).astype(np.float32)  # 10 seconds
result = session.run(None, {"waveform": audio})
probs = result[0][0]

top_idx = np.argmax(probs)
print(f"Language: {labels[top_idx]} (confidence: {probs[top_idx]:.4f})")

Usage with ONNX Runtime (Rust)

use ort::session::Session;

let session = Session::builder()?.commit_from_file("lang-id-ecapa.onnx")?;
// Input: "waveform" [1, samples] float32
// Output: "language_probs" [1, 107] float32

Model Details

  • Architecture: ECAPA-TDNN (originally for speaker recognition, adapted for language ID)
  • Training data: VoxLingua107 — 6628 hours of speech across 107 languages
  • Input: Raw waveform at 16kHz mono ([1, samples] float32)
  • Output: Language probabilities ([1, 107] float32, softmax applied)
  • Error rate: 6.7% on VoxLingua107 dev set

Supported Languages

ab, af, am, ar, as, az, ba, be, bg, bn, bo, br, ca, ceb, cs, cy, da, de, el, en, eo, es, et, eu, fa, fi, fo, fr, gl, gn, gu, ha, haw, he, hi, hr, ht, hu, hy, ia, id, is, it, ja, jw, ka, kk, km, kn, ko, la, lb, ln, lo, lt, lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, nn, no, oc, pa, pl, ps, pt, ro, ru, sa, sd, si, sk, sl, sn, so, sq, sr, su, sv, sw, ta, te, tg, th, tk, tl, tr, tt, uk, ur, uz, vi, war, yi, yo, zh

Conversion

Converted from PyTorch using torch.onnx.export (ONNX) and torch.export + coremltools (CoreML).

Conversion script: scripts/convert-lang-id-model.py

License

Apache 2.0 (same as the original SpeechBrain model)

Sources

1 source
Hugging FacePrincipalVersion 41e60dea31b80ea5d4f9d9d9e818501ea184e568
huggingface.co/drakulavich/SpeechBrain-coreml/tree/41e60dea31b80ea5d4f9d9d9e818501ea184e568

Vérifié 5 nov.

Artefacts du modèle

1 artefact

lang-id-ecapa.onnx

onnx · 742 KB · SHA-256 4af3b6a5b416…a288 · Hugging Face

Download file

Extraits de sources

2 extraits

--- language: - multilingual tags: - speech - language-identification - ecapa-tdnn - onnx - coreml - kesha-voice-kit license: apache-2.0 library_name: onnx pipeline_tag: audio-classification base_model: speechbrain/lang-id-voxlingua107-ecapa --- # SpeechBrain ECAPA-TDNN — ONNX + CoreML Pre-converted [speechbrain/lang-id-voxlingua107-ecapa](https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa) model for spoken language identification. Supports **107 languages** from audio. Converted for use with [Kesha Voice Kit](https://github.com/drakulavich/kesha-voice-kit) — open-source voice toolkit. ## Files | 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 | ## Usage with Kesha Voice Kit ```bash bun install -g @drakulavich/kesha-voice-kit kesha install # downloads this model automatically kesha --json audio.ogg # transcribe + detect language ``` ## Usage with ONNX Runtime (Python) ```python import onnxruntime as ort import numpy as np import json session = ort.InferenceSession("lang-id-ecapa.onnx") with open("labels.json") as f: labels = json.load(f) # Input: 16kHz mono float32 waveform audio = np.random.randn(1, 160000).astype(np.float32) # 10 seconds result = session.run(None, {"waveform": audio}) probs = result[0][0] top_idx = np.argmax(probs) print(f"Language: {labels[top_idx]} (confidence: {probs[top_idx]:.4f})") ``` ## Usage with ONNX Runtime (Rust) ```rust use ort::session::Session; let session = Session::builder()?.commit_from_file("lang-id-ecapa.onnx")?; // Input: "waveform" [1, samples] float32 // Output: "language_probs" [1, 107] float32 ``` ## Model Details - **Architecture:** ECAPA-TDNN (originally for speaker recognition, adapted for language ID) - **Training data:** [VoxLingua107](http://bark.phon.ioc.ee/voxlingua107/) — 6628 hours of speech across 107 languages - **Input:** Raw waveform at 16kHz mono (`[1, samples]` float32) - **Output:** Language probabilities (`[1, 107]` float32, softmax applied) - **Error rate:** 6.7% on VoxLingua107 dev set ## Supported Languages ab, af, am, ar, as, az, ba, be, bg, bn, bo, br, ca, ceb, cs, cy, da,...

Source context: 0 downloads · 0 likes · Pipeline audio-classification · Library onnx · Repo drakulavich/SpeechBrain-coreml