Instructions to use aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir SpeechBrain-ECAPA-VoxLingua107-21M-MLX aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-MLX
- speechbrain
How to use aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-MLX with speechbrain:
# interface not specified in config.json
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
SpeechBrain ECAPA VoxLingua107 MLX
This is a pinned, validated MLX export of
speechbrain/lang-id-voxlingua107-ecapa
for native Apple Silicon inference. It ranks 107 spoken-language labels.
Model
| Property | Value |
|---|---|
| Parameters | 21.25 million |
| Weights | Safetensors, FLOAT16 |
| Weight size | 40.6 MiB |
| Input | SpeechBrain log-mel [1, frames, 60] |
| Sample rate | 16 kHz |
| Output | 107 log probabilities |
The runtime contract includes sentence-level mean normalization. The exporter compares an independent periodic-Hamming, symmetric-filter frontend with the official SpeechBrain implementation before accepting the weights.
Files
| File | Description |
|---|---|
model.safetensors |
MLX-layout ECAPA and classifier weights |
mlx_model.py |
Native MLX ECAPA graph |
frontend.py |
Reproducible SpeechBrain log-mel frontend |
labels.json |
Stable upstream index, code, and name mapping |
config.json |
Architecture, frontend, revisions, and checksums |
artifact_manifest.json |
SHA-256 and size of every artifact file |
validation.json |
PyTorch/MLX parity and local latency measurements |
requirements.txt |
Pinned standalone runtime dependencies |
LICENSE |
Apache 2.0 license |
Validation
| Check | Result |
|---|---|
| Minimum PyTorch/MLX output cosine | 1.000000 |
| Maximum absolute error | 0.008958 |
| Warm local inference | 5.3 ms |
The upstream card reports 6.7% error on a small 33-language development subset, not a complete test over all 107 labels. Product evaluation should use the intended languages, accents, microphones, noise, and short-utterance mix.
Standalone MLX
import json
import mlx.core as mx
import soundfile as sf
from frontend import compute_fbank
from mlx_model import LanguageIDModel
audio, sample_rate = sf.read("recording.wav", dtype="float32")
assert sample_rate == 16000 and audio.ndim == 1
features = compute_fbank(audio, 60)[None, :, :]
model = LanguageIDModel()
model.load_weights(list(mx.load("model.safetensors").items()), strict=True)
log_probabilities = model(mx.array(features))
mx.eval(log_probabilities)
labels = json.load(open("labels.json", encoding="utf-8"))
best = int(mx.argmax(log_probabilities, axis=-1).item())
print(labels[best], float(mx.exp(log_probabilities[0, best]).item()))
speech-swift
speech language-id recording.wav --top 5
This is a closed-set classifier and is not an unknown-language detector. Keep the original class indexes; normalized aliases belong in application output, not in the model head.
Source
Converted from the official SpeechBrain checkpoint at revision
0253049ae131d6a4be1c4f0d8b0ff483a0f8c8e9. Source and checkpoint hashes are in config.json.
Links
- speech-swift — Apple SDK
- Docs — install and CLI docs
- soniqo.audio
- blog
- Downloads last month
- 63
Quantized
Model tree for aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-MLX
Base model
speechbrain/lang-id-voxlingua107-ecapa