Skip to content
ModelListedExternal
Download

Lang Id Voxlingua107 Ecapa Mlx

ECAPA-TDNN language identification model converted to MLX safetensors format for inference on Apple Silicon (Metal GPU).

KindOtherBase modelspeechbrain/lang-id-voxlingua107-ecapaVersionRevision ea8995c

Model source

Kind
Other
File size
81.2 MB
Base model
speechbrain/lang-id-voxlingua107-ecapa
Version
vRevision ea8995c
Updated
Sep 13, 2026
Downloads
46
Source
Hugging Face

Source description

ECAPA-TDNN VoxLingua107 — MLX

ECAPA-TDNN language identification model converted to MLX safetensors format for inference on Apple Silicon (Metal GPU).

Identifies 107 languages from audio. Original model: speechbrain/lang-id-voxlingua107-ecapa.

Performance (M1, 10s audio)

FrameworkLatencyRussianEnglish
Python MLX (with mx.compile())15.7ms99.6%99.9%
Swift MLX (with compile() + GPU mel)14.8ms99.5%99.9%
CoreML GPU17ms99.7%98.6%

Usage

# Clone the benchmark repo
git clone https://github.com/beshkenadze/lid-bench
cd lid-bench/mlx

# Setup
uv venv && uv pip install mlx numpy soundfile safetensors

# Run
python ecapa_tdnn_lid.py path/to/audio.wav --benchmark

Full implementation: github.com/beshkenadze/lid-bench

Model Details

  • Architecture: ECAPA-TDNN (channels=1024, embed_dim=256)
  • Input: Log-mel spectrogram (60 mels, periodic Hamming window, SpeechBrain-compatible)
  • Output: 107 language probabilities
  • Parameters: 20M
  • Weight format: safetensors (81.2 MB)
  • Conversion: SpeechBrain .ckpt → Conv1d axis swap → safetensors

Weight Conversion

Weights were converted from the original SpeechBrain checkpoint:

  • Conv1d axes swapped: [out, in, kernel] → [out, kernel, in] (MLX convention)
  • BatchNorm running stats preserved
  • No quantization applied

Convert script: mlx/convert_ecapa_weights.py in the lid-bench repo.

Sources

1 source
Hugging FacePrimaryVersion ea8995c21cc571117f2dcddee39ac3b22f7fde83
huggingface.co/beshkenadze/lang-id-voxlingua107-ecapa-mlx/tree/ea8995c21cc571117f2dcddee39ac3b22f7fde83

Verified Sep 13

Model artifacts

1 artifact

ecapa_tdnn_lid107.safetensors

safetensors · 81.2 MB · SHA-256 bae5627c78e9…dbc8 · Hugging Face

Download

Source excerpts

2 excerpts

--- license: apache-2.0 tags: - mlx - audio-classification - language-identification - ecapa-tdnn - apple-silicon language: - multilingual base_model: speechbrain/lang-id-voxlingua107-ecapa pipeline_tag: audio-classification --- # ECAPA-TDNN VoxLingua107 — MLX ECAPA-TDNN language identification model converted to MLX safetensors format for inference on Apple Silicon (Metal GPU). Identifies **107 languages** from audio. Original model: [speechbrain/lang-id-voxlingua107-ecapa](https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa). ## Performance (M1, 10s audio) | Framework | Latency | Russian | English | |---|---|---|---| | **Python MLX** (with `mx.compile()`) | **15.7ms** | 99.6% | 99.9% | | **Swift MLX** (with `compile()` + GPU mel) | **14.8ms** | 99.5% | 99.9% | | CoreML GPU | 17ms | 99.7% | 98.6% | ## Usage ```python # Clone the benchmark repo git clone https://github.com/beshkenadze/lid-bench cd lid-bench/mlx # Setup uv venv && uv pip install mlx numpy soundfile safetensors # Run python ecapa_tdnn_lid.py path/to/audio.wav --benchmark ``` Full implementation: [github.com/beshkenadze/lid-bench](https://github.com/beshkenadze/lid-bench) ## Model Details - **Architecture**: ECAPA-TDNN (channels=1024, embed_dim=256) - **Input**: Log-mel spectrogram (60 mels, periodic Hamming window, SpeechBrain-compatible) - **Output**: 107 language probabilities - **Parameters**: 20M - **Weight format**: safetensors (81.2 MB) - **Conversion**: SpeechBrain `.ckpt` → Conv1d axis swap → safetensors ## Weight Conversion Weights were converted from the original SpeechBrain checkpoint: - Conv1d axes swapped: `[out, in, kernel]` → `[out, kernel, in]` (MLX convention) - BatchNorm running stats preserved - No quantization applied Convert script: `mlx/convert_ecapa_weights.py` in the [lid-bench repo](https://github.com/beshkenadze/lid-bench).

Source context: 46 downloads · 0 likes · Pipeline audio-classification · Library mlx · Repo beshkenadze/lang-id-voxlingua107-ecapa-mlx