aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-CoreML
SpeechBrain ECAPA VoxLingua107 Core ML
This is a pinned, validated compiled Core ML export of `speechbrain/lang-id-voxlingua107-ecapa`. It identifies one of 107 spoken-language labels on Apple devices.
Model
Unlike several earlier community conversions, this graph includes the sentence-level mean normalization used by the official SpeechBrain inference pipeline. The release also validates an independent audio frontend against SpeechBrain itself.
Files
Validation
The upstream card reports 6.7% classification error on the VoxLingua107 development set. That development set contains only 1,609 manually verified clips across 33 of the 107 labels, so it is not a complete 107-language evaluation.
Usage
import coremltools as ct
import numpy as np
import soundfile as sf
from frontend import compute_fbank
model = ct.models.CompiledMLModel("SpeechBrainECAPAVoxLingua107.mlmodelc")
audio, sample_rate = sf.read("recording.wav", dtype="float32")
assert sample_rate == 16000 and audio.ndim == 1
mel = compute_fbank(audio, 60)[None, :, :]
log_probabilities = model.predict({"mel_features": mel})["log_probabilities"]This is a closed-set classifier: it always ranks a known label. Applications need confidence calibration and an unknown-language rejection policy.
Source
Converted from the official SpeechBrain checkpoint at revision 0253049ae131d6a4be1c4f0d8b0ff483a0f8c8e9. Source and checkpoint hashes are recorded in config.json. Upstream legacy codes such as iw and jw are preserved in labels.json so class indexes never change.
Links
- speech-swift — Apple SDK
- Docs — install and CLI docs
- soniqo.audio
- blog
