CoolFace
Modelpublic

aufklarer/SpeechBrain-ECAPA-VoxLingua107-21M-CoreML

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes31downloads
Model Card

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

PropertyValue
Parameters21.25 million
FormatCompiled Core ML, FLOAT16 compute
Compiled size40.8 MiB
InputSpeechBrain log-mel [1, frames, 60]
Sample rate16 kHz
Output107 log probabilities
Mel frames10 to 3,001 (about 0.1 to 30 seconds)
Minimum deploymentmacOS 15 / iOS 18

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

FileDescription
SpeechBrainECAPAVoxLingua107.mlmodelc/Precompiled Core ML model
frontend.pyReproducible SpeechBrain log-mel frontend
labels.jsonStable upstream index, code, and name mapping
config.jsonFrontend, graph, source revisions, and checksums
artifact_manifest.jsonSHA-256 and size of every compiled artifact file
validation.jsonConversion parity and local latency measurements
requirements.txtPinned standalone runtime dependencies
LICENSEApache 2.0 license

Validation

CheckResult
Minimum PyTorch/Core ML output cosine0.999967
Maximum absolute error0.217239
Warm local inference3.7 ms

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

python
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