ear / ear_meta.json
finnvoorhees's picture
Move the frontend into the SDK; one artifact per runtime
5ac5bec verified
Raw
History Blame Contribute Delete
3.89 kB
{
"model": "ear",
"version": "0.1.0",
"task": "spoken-language-identification",
"audio": {
"sample_rate": 16000,
"channels": 1,
"window_seconds": 30,
"recommended_windows": 3,
"note": "Sample windows spread across the recording, not the first 90 seconds: openings are intros and music. Average the probabilities across windows rather than counting votes."
},
"frontend": {
"n_fft": 400,
"hop_length": 160,
"n_mels": 80,
"frames": 3000,
"window": "hann_periodic",
"log": "log10",
"clamp_min": 1e-10,
"floor_below_peak_db": 8,
"affine": {
"add": 4.0,
"divide": 4.0
},
"input_shape": [
1,
80,
3000
],
"input_layout": "log-mel, mel-major. The frontend is host-side because it cannot run in float16: the power spectrum is squared magnitudes floored at 1e-10 and 80% of its bins fall below float16's smallest normal number. Measured on real audio it holds 200 dB in float32 and 27 dB in float16, and folding it into the float16 graph takes routing accuracy from 97.5% to 84.2%.",
"computed_by": "the SDK, in host code",
"filterbank": "mel_filters.f32"
},
"artifacts": {
"coreml": {
"file": "ear.mlmodelc",
"precision": "fp16",
"compression": "palette6-group32",
"input": "mel",
"output": "logits",
"ops": 256,
"ane_residency": 1.0,
"note": "A compiled program, not an .mlpackage. Core ML keys its specialized Neural Engine cache on the compiled model's path, so an .mlpackage recompiles on every launch and never hits it."
},
"litert": {
"file": "ear.tflite",
"quantization": "dynamic_wi8c_hr_afp32",
"input": "mel",
"output": "output_0",
"note": "Hadamard rotation is what makes 8 bits work here. Plain min-max int8 is smaller and faster and loses 11 points of routing accuracy."
},
"filterbank": {
"file": "mel_filters.f32",
"layout": "uint32 mels, uint32 bins, then mels*bins float32, little-endian, mel-major",
"note": "Shipped as a table rather than rebuilt in host code: the reference filters are slaney-normalized librosa output and reimplementing that is silent drift."
}
},
"output": {
"logits": 99,
"order": "languages.json",
"decision": "argmax over averaged softmax across windows"
},
"languages": [
"en",
"zh",
"de",
"es",
"ru",
"ko",
"fr",
"ja",
"pt",
"tr",
"pl",
"ca",
"nl",
"ar",
"sv",
"it",
"id",
"hi",
"fi",
"vi",
"he",
"uk",
"el",
"ms",
"cs",
"ro",
"da",
"hu",
"ta",
"no",
"th",
"ur",
"hr",
"bg",
"lt",
"la",
"mi",
"ml",
"cy",
"sk",
"te",
"fa",
"lv",
"bn",
"sr",
"az",
"sl",
"kn",
"et",
"mk",
"br",
"eu",
"is",
"hy",
"ne",
"mn",
"bs",
"kk",
"sq",
"sw",
"gl",
"mr",
"pa",
"si",
"km",
"sn",
"yo",
"so",
"af",
"oc",
"ka",
"be",
"tg",
"sd",
"gu",
"am",
"yi",
"lo",
"uz",
"fo",
"ht",
"ps",
"tk",
"nn",
"mt",
"sa",
"lb",
"my",
"bo",
"tl",
"mg",
"as",
"tt",
"haw",
"ln",
"ha",
"ba",
"jw",
"su"
],
"untrusted": [
"no",
"sv",
"da"
],
"untrusted_note": "The base model reads Norwegian as Swedish about 40% of the time. Route this group to a fallback recognizer rather than acting on the answer.",
"measured": {
"clips": {
"corpus": "FLEURS",
"n": 640,
"languages": 32,
"routing": 0.975,
"exact": 0.862
},
"continuous": {
"corpus": "VoxPopuli",
"files": 113,
"segment_seconds": 30,
"routing_per_segment": 0.909,
"routing_per_file": 0.923,
"routing_in_scope": 1.0
},
"latency_ms": {
"coreml_m3_ultra": 15.8,
"litert_desktop_cpu_4_threads": 45.0
},
"note": "Read and parliamentary speech only. No music, crosstalk, or phone audio, and no on-device measurement."
},
"derived_from": {
"model": "openai/whisper-tiny",
"license": "MIT",
"params_before": 37800000,
"params_after": 17900000
}
}