Audio Classification
LiteRT
LiteRT
language-identification
language-detection
langid
spoken-language-identification
speech
on-device
edge-ai
mobile
offline
core-ml
apple-neural-engine
multilingual
Instructions to use desert-ant-labs/ear with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use desert-ant-labs/ear with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
ear 0.1.0: spoken language identification, Core ML and LiteRT
Browse filesDerived from openai/whisper-tiny (MIT), stripped to the subgraph that predicts a language: 37.8M parameters to 17.9M, identical predictions.
Core ML ships as two artifacts on purpose. The frontend runs in fp32 because its power spectrum is squared magnitudes clamped at 1e-10 and 80% of those bins fall below fp16's smallest normal number; fusing it into the fp16 detector scores 84.2% routing where the split scores 97.5%. LiteRT is one file because it runs the frontend in fp32 anyway.
Detector is 256 ops, 100% Neural Engine, 15.8 ms per 30 s window.
- README.md +129 -0
- THIRD_PARTY_NOTICES.md +40 -0
- detector.mlmodelc/analytics/coremldata.bin +3 -0
- detector.mlmodelc/coremldata.bin +3 -0
- detector.mlmodelc/model.mil +0 -0
- detector.mlmodelc/weights/weight.bin +3 -0
- ear.tflite +3 -0
- ear_meta.json +202 -0
- languages.json +1 -0
- mel.mlmodelc/analytics/coremldata.bin +3 -0
- mel.mlmodelc/coremldata.bin +3 -0
- mel.mlmodelc/model.mil +55 -0
- mel.mlmodelc/weights/weight.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: desert-ant-labs-source-available-1.0
|
| 4 |
+
license_link: https://license.desertant.com/1.0
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- zh
|
| 8 |
+
- de
|
| 9 |
+
- es
|
| 10 |
+
- ru
|
| 11 |
+
- ko
|
| 12 |
+
- fr
|
| 13 |
+
- ja
|
| 14 |
+
- pt
|
| 15 |
+
- tr
|
| 16 |
+
- pl
|
| 17 |
+
- ca
|
| 18 |
+
- nl
|
| 19 |
+
- ar
|
| 20 |
+
- sv
|
| 21 |
+
- it
|
| 22 |
+
- id
|
| 23 |
+
- hi
|
| 24 |
+
- fi
|
| 25 |
+
- vi
|
| 26 |
+
- he
|
| 27 |
+
- uk
|
| 28 |
+
- el
|
| 29 |
+
- ms
|
| 30 |
+
- cs
|
| 31 |
+
- ro
|
| 32 |
+
- da
|
| 33 |
+
- hu
|
| 34 |
+
- ta
|
| 35 |
+
- no
|
| 36 |
+
- th
|
| 37 |
+
- ur
|
| 38 |
+
- hr
|
| 39 |
+
- bg
|
| 40 |
+
- lt
|
| 41 |
+
- la
|
| 42 |
+
- mi
|
| 43 |
+
- ml
|
| 44 |
+
- cy
|
| 45 |
+
- sk
|
| 46 |
+
- te
|
| 47 |
+
- fa
|
| 48 |
+
- lv
|
| 49 |
+
- bn
|
| 50 |
+
- sr
|
| 51 |
+
- az
|
| 52 |
+
- sl
|
| 53 |
+
- kn
|
| 54 |
+
- et
|
| 55 |
+
- mk
|
| 56 |
+
- br
|
| 57 |
+
- eu
|
| 58 |
+
- is
|
| 59 |
+
- hy
|
| 60 |
+
- ne
|
| 61 |
+
- mn
|
| 62 |
+
- bs
|
| 63 |
+
- kk
|
| 64 |
+
- sq
|
| 65 |
+
- sw
|
| 66 |
+
- gl
|
| 67 |
+
- mr
|
| 68 |
+
- pa
|
| 69 |
+
- si
|
| 70 |
+
- km
|
| 71 |
+
- sn
|
| 72 |
+
- yo
|
| 73 |
+
- so
|
| 74 |
+
- af
|
| 75 |
+
- oc
|
| 76 |
+
- ka
|
| 77 |
+
- be
|
| 78 |
+
- tg
|
| 79 |
+
- sd
|
| 80 |
+
- gu
|
| 81 |
+
- am
|
| 82 |
+
- yi
|
| 83 |
+
- lo
|
| 84 |
+
- uz
|
| 85 |
+
- fo
|
| 86 |
+
- ht
|
| 87 |
+
- ps
|
| 88 |
+
- tk
|
| 89 |
+
- nn
|
| 90 |
+
- mt
|
| 91 |
+
- sa
|
| 92 |
+
- lb
|
| 93 |
+
- my
|
| 94 |
+
- bo
|
| 95 |
+
- tl
|
| 96 |
+
- mg
|
| 97 |
+
- as
|
| 98 |
+
- tt
|
| 99 |
+
- haw
|
| 100 |
+
- ln
|
| 101 |
+
- ha
|
| 102 |
+
- ba
|
| 103 |
+
- jw
|
| 104 |
+
- su
|
| 105 |
+
tags:
|
| 106 |
+
- language-identification
|
| 107 |
+
- language-detection
|
| 108 |
+
- langid
|
| 109 |
+
- spoken-language-identification
|
| 110 |
+
- audio-classification
|
| 111 |
+
- speech
|
| 112 |
+
- on-device
|
| 113 |
+
- edge-ai
|
| 114 |
+
- mobile
|
| 115 |
+
- offline
|
| 116 |
+
- core-ml
|
| 117 |
+
- apple-neural-engine
|
| 118 |
+
- litert
|
| 119 |
+
- multilingual
|
| 120 |
+
pipeline_tag: audio-classification
|
| 121 |
+
---
|
| 122 |
+
|
| 123 |
+
# Ear
|
| 124 |
+
|
| 125 |
+
Name the language from thirty seconds.
|
| 126 |
+
|
| 127 |
+
On-device spoken language identification across 99 languages.
|
| 128 |
+
|
| 129 |
+
- **SDKs and documentation:** https://github.com/Desert-Ant-Labs/desert-ant-core
|
THIRD_PARTY_NOTICES.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Third-party notices
|
| 2 |
+
|
| 3 |
+
## openai/whisper-tiny
|
| 4 |
+
|
| 5 |
+
The weights in this repository are derived from
|
| 6 |
+
[`openai/whisper-tiny`](https://huggingface.co/openai/whisper-tiny), released by
|
| 7 |
+
OpenAI under the MIT License. The derivation removes the parameters this task
|
| 8 |
+
does not use, keeps the subgraph that predicts a language, and compresses the
|
| 9 |
+
result for on-device execution.
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
MIT License
|
| 13 |
+
|
| 14 |
+
Copyright (c) 2022 OpenAI
|
| 15 |
+
|
| 16 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 17 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 18 |
+
in the Software without restriction, including without limitation the rights
|
| 19 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 20 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 21 |
+
furnished to do so, subject to the following conditions:
|
| 22 |
+
|
| 23 |
+
The above copyright notice and this permission notice shall be included in all
|
| 24 |
+
copies or substantial portions of the Software.
|
| 25 |
+
|
| 26 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 27 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 28 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 29 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 30 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 31 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 32 |
+
SOFTWARE.
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Evaluation corpora
|
| 36 |
+
|
| 37 |
+
Published accuracy figures are measured on
|
| 38 |
+
[FLEURS](https://huggingface.co/datasets/google/fleurs) (CC BY 4.0, Google) and
|
| 39 |
+
[VoxPopuli](https://huggingface.co/datasets/facebook/voxpopuli) (CC0, Meta).
|
| 40 |
+
Neither corpus is redistributed here.
|
detector.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed952e53694c407af19c56cc16e371ed3bc22af3260baec41cbe9cbdf7522ddd
|
| 3 |
+
size 243
|
detector.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bff545265c96ee0d12a127a6ed818422e6af9edd065ffbc9bd3294e1d1d0587c
|
| 3 |
+
size 369
|
detector.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
detector.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac2f45edb6654b49bfda1d2160276bebb73c325e5deb2f0deee03df0267956cf
|
| 3 |
+
size 13696070
|
ear.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eafb390863c39b28b607094fbbb7ae9202ece7ce0d5f5a28839fdc69b5770853
|
| 3 |
+
size 23947568
|
ear_meta.json
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "ear",
|
| 3 |
+
"version": "0.1.0",
|
| 4 |
+
"task": "spoken-language-identification",
|
| 5 |
+
"audio": {
|
| 6 |
+
"sample_rate": 16000,
|
| 7 |
+
"channels": 1,
|
| 8 |
+
"window_seconds": 30,
|
| 9 |
+
"recommended_windows": 3,
|
| 10 |
+
"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."
|
| 11 |
+
},
|
| 12 |
+
"frontend": {
|
| 13 |
+
"n_fft": 400,
|
| 14 |
+
"hop_length": 160,
|
| 15 |
+
"n_mels": 80,
|
| 16 |
+
"frames": 3000,
|
| 17 |
+
"window": "hann_periodic",
|
| 18 |
+
"log": "log10",
|
| 19 |
+
"clamp_min": 1e-10,
|
| 20 |
+
"floor_below_peak_db": 8,
|
| 21 |
+
"affine": {
|
| 22 |
+
"add": 4.0,
|
| 23 |
+
"divide": 4.0
|
| 24 |
+
},
|
| 25 |
+
"input_shape": [
|
| 26 |
+
1,
|
| 27 |
+
160,
|
| 28 |
+
1,
|
| 29 |
+
3002
|
| 30 |
+
],
|
| 31 |
+
"input_layout": "waveform reflect-padded by n_fft/2, reshaped to [1, hop, 1, rows]; framing is host-side"
|
| 32 |
+
},
|
| 33 |
+
"artifacts": {
|
| 34 |
+
"coreml": {
|
| 35 |
+
"mel": {
|
| 36 |
+
"file": "mel.mlmodelc",
|
| 37 |
+
"precision": "fp32",
|
| 38 |
+
"input": "audio_rows",
|
| 39 |
+
"output": "mel",
|
| 40 |
+
"note": "fp32 is required, not a default. The power spectrum is squared magnitudes clamped at 1e-10, and 80% of its bins fall below fp16's smallest normal number. In fp16 this stage measures 27 dB on real audio against 200 dB in fp32, and end-to-end routing drops from 97.5% to 84.2%."
|
| 41 |
+
},
|
| 42 |
+
"detector": {
|
| 43 |
+
"file": "detector.mlmodelc",
|
| 44 |
+
"precision": "fp16",
|
| 45 |
+
"compression": "palette6-group32",
|
| 46 |
+
"input": "mel",
|
| 47 |
+
"output": "logits",
|
| 48 |
+
"ops": 256,
|
| 49 |
+
"ane_residency": 1.0
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"litert": {
|
| 53 |
+
"model": {
|
| 54 |
+
"file": "ear.tflite",
|
| 55 |
+
"quantization": "dynamic_wi8c_hr_afp32",
|
| 56 |
+
"input": "audio_rows",
|
| 57 |
+
"output": "logits",
|
| 58 |
+
"note": "One file: LiteRT runs the frontend in fp32, so it is fused. Hadamard rotation is what makes 8-bit work here; plain min-max int8 loses 11 points of routing."
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"output": {
|
| 63 |
+
"logits": 99,
|
| 64 |
+
"order": "languages.json",
|
| 65 |
+
"decision": "argmax over averaged softmax across windows"
|
| 66 |
+
},
|
| 67 |
+
"languages": [
|
| 68 |
+
"en",
|
| 69 |
+
"zh",
|
| 70 |
+
"de",
|
| 71 |
+
"es",
|
| 72 |
+
"ru",
|
| 73 |
+
"ko",
|
| 74 |
+
"fr",
|
| 75 |
+
"ja",
|
| 76 |
+
"pt",
|
| 77 |
+
"tr",
|
| 78 |
+
"pl",
|
| 79 |
+
"ca",
|
| 80 |
+
"nl",
|
| 81 |
+
"ar",
|
| 82 |
+
"sv",
|
| 83 |
+
"it",
|
| 84 |
+
"id",
|
| 85 |
+
"hi",
|
| 86 |
+
"fi",
|
| 87 |
+
"vi",
|
| 88 |
+
"he",
|
| 89 |
+
"uk",
|
| 90 |
+
"el",
|
| 91 |
+
"ms",
|
| 92 |
+
"cs",
|
| 93 |
+
"ro",
|
| 94 |
+
"da",
|
| 95 |
+
"hu",
|
| 96 |
+
"ta",
|
| 97 |
+
"no",
|
| 98 |
+
"th",
|
| 99 |
+
"ur",
|
| 100 |
+
"hr",
|
| 101 |
+
"bg",
|
| 102 |
+
"lt",
|
| 103 |
+
"la",
|
| 104 |
+
"mi",
|
| 105 |
+
"ml",
|
| 106 |
+
"cy",
|
| 107 |
+
"sk",
|
| 108 |
+
"te",
|
| 109 |
+
"fa",
|
| 110 |
+
"lv",
|
| 111 |
+
"bn",
|
| 112 |
+
"sr",
|
| 113 |
+
"az",
|
| 114 |
+
"sl",
|
| 115 |
+
"kn",
|
| 116 |
+
"et",
|
| 117 |
+
"mk",
|
| 118 |
+
"br",
|
| 119 |
+
"eu",
|
| 120 |
+
"is",
|
| 121 |
+
"hy",
|
| 122 |
+
"ne",
|
| 123 |
+
"mn",
|
| 124 |
+
"bs",
|
| 125 |
+
"kk",
|
| 126 |
+
"sq",
|
| 127 |
+
"sw",
|
| 128 |
+
"gl",
|
| 129 |
+
"mr",
|
| 130 |
+
"pa",
|
| 131 |
+
"si",
|
| 132 |
+
"km",
|
| 133 |
+
"sn",
|
| 134 |
+
"yo",
|
| 135 |
+
"so",
|
| 136 |
+
"af",
|
| 137 |
+
"oc",
|
| 138 |
+
"ka",
|
| 139 |
+
"be",
|
| 140 |
+
"tg",
|
| 141 |
+
"sd",
|
| 142 |
+
"gu",
|
| 143 |
+
"am",
|
| 144 |
+
"yi",
|
| 145 |
+
"lo",
|
| 146 |
+
"uz",
|
| 147 |
+
"fo",
|
| 148 |
+
"ht",
|
| 149 |
+
"ps",
|
| 150 |
+
"tk",
|
| 151 |
+
"nn",
|
| 152 |
+
"mt",
|
| 153 |
+
"sa",
|
| 154 |
+
"lb",
|
| 155 |
+
"my",
|
| 156 |
+
"bo",
|
| 157 |
+
"tl",
|
| 158 |
+
"mg",
|
| 159 |
+
"as",
|
| 160 |
+
"tt",
|
| 161 |
+
"haw",
|
| 162 |
+
"ln",
|
| 163 |
+
"ha",
|
| 164 |
+
"ba",
|
| 165 |
+
"jw",
|
| 166 |
+
"su"
|
| 167 |
+
],
|
| 168 |
+
"untrusted": [
|
| 169 |
+
"no",
|
| 170 |
+
"sv",
|
| 171 |
+
"da"
|
| 172 |
+
],
|
| 173 |
+
"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.",
|
| 174 |
+
"measured": {
|
| 175 |
+
"clips": {
|
| 176 |
+
"corpus": "FLEURS",
|
| 177 |
+
"n": 640,
|
| 178 |
+
"languages": 32,
|
| 179 |
+
"routing": 0.975,
|
| 180 |
+
"exact": 0.862
|
| 181 |
+
},
|
| 182 |
+
"continuous": {
|
| 183 |
+
"corpus": "VoxPopuli",
|
| 184 |
+
"files": 113,
|
| 185 |
+
"segment_seconds": 30,
|
| 186 |
+
"routing_per_segment": 0.909,
|
| 187 |
+
"routing_per_file": 0.923,
|
| 188 |
+
"routing_in_scope": 1.0
|
| 189 |
+
},
|
| 190 |
+
"latency_ms": {
|
| 191 |
+
"coreml_m3_ultra": 15.8,
|
| 192 |
+
"litert_desktop_cpu_4_threads": 45.0
|
| 193 |
+
},
|
| 194 |
+
"note": "Read and parliamentary speech only. No music, crosstalk, or phone audio, and no on-device measurement."
|
| 195 |
+
},
|
| 196 |
+
"derived_from": {
|
| 197 |
+
"model": "openai/whisper-tiny",
|
| 198 |
+
"license": "MIT",
|
| 199 |
+
"params_before": 37800000,
|
| 200 |
+
"params_after": 17900000
|
| 201 |
+
}
|
| 202 |
+
}
|
languages.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
["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"]
|
mel.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e926bc1b285e259baaa9b564155ff49c46b5cd027837dda998945b580ba20389
|
| 3 |
+
size 243
|
mel.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ce5ca49f387402b03f700a2f15138b6daadecc8bdd36e90d50bebf0f2d889c2
|
| 3 |
+
size 377
|
mel.mlmodelc/model.mil
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
program(1.3)
|
| 2 |
+
[buildInfo = dict<string, string>({{"coremlc-component-MIL", "3600.16.1"}, {"coremlc-version", "3600.25.2"}, {"coremltools-component-torch", "2.13.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})]
|
| 3 |
+
{
|
| 4 |
+
func main<ios18>(tensor<fp32, [1, 160, 1, 3002]> audio_rows) {
|
| 5 |
+
fp32 var_3 = const()[name = string("op_3"), val = fp32(0x1.b7cdfep-34)];
|
| 6 |
+
bool var_14 = const()[name = string("op_14"), val = bool(true)];
|
| 7 |
+
tensor<fp32, [80, 201, 1, 1]> self_mel_weight = const()[name = string("self_mel_weight"), val = tensor<fp32, [80, 201, 1, 1]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))];
|
| 8 |
+
tensor<fp32, [402, 160, 1, 3]> self_stft_weight = const()[name = string("self_stft_weight"), val = tensor<fp32, [402, 160, 1, 3]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64448)))];
|
| 9 |
+
string spectrum_pad_type_0 = const()[name = string("spectrum_pad_type_0"), val = string("valid")];
|
| 10 |
+
tensor<int32, [2]> spectrum_strides_0 = const()[name = string("spectrum_strides_0"), val = tensor<int32, [2]>([1, 1])];
|
| 11 |
+
tensor<int32, [4]> spectrum_pad_0 = const()[name = string("spectrum_pad_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 12 |
+
tensor<int32, [2]> spectrum_dilations_0 = const()[name = string("spectrum_dilations_0"), val = tensor<int32, [2]>([1, 1])];
|
| 13 |
+
int32 spectrum_groups_0 = const()[name = string("spectrum_groups_0"), val = int32(1)];
|
| 14 |
+
tensor<fp32, [1, 402, 1, 3000]> spectrum = conv(dilations = spectrum_dilations_0, groups = spectrum_groups_0, pad = spectrum_pad_0, pad_type = spectrum_pad_type_0, strides = spectrum_strides_0, weight = self_stft_weight, x = audio_rows)[name = string("spectrum")];
|
| 15 |
+
tensor<int32, [4]> real_begin_0 = const()[name = string("real_begin_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 16 |
+
tensor<int32, [4]> real_end_0 = const()[name = string("real_end_0"), val = tensor<int32, [4]>([1, 201, 1, 3000])];
|
| 17 |
+
tensor<bool, [4]> real_end_mask_0 = const()[name = string("real_end_mask_0"), val = tensor<bool, [4]>([true, false, true, true])];
|
| 18 |
+
tensor<fp32, [1, 201, 1, 3000]> real = slice_by_index(begin = real_begin_0, end = real_end_0, end_mask = real_end_mask_0, x = spectrum)[name = string("real")];
|
| 19 |
+
tensor<int32, [4]> imag_begin_0 = const()[name = string("imag_begin_0"), val = tensor<int32, [4]>([0, 201, 0, 0])];
|
| 20 |
+
tensor<int32, [4]> imag_end_0 = const()[name = string("imag_end_0"), val = tensor<int32, [4]>([1, 402, 1, 3000])];
|
| 21 |
+
tensor<bool, [4]> imag_end_mask_0 = const()[name = string("imag_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
|
| 22 |
+
tensor<fp32, [1, 201, 1, 3000]> imag = slice_by_index(begin = imag_begin_0, end = imag_end_0, end_mask = imag_end_mask_0, x = spectrum)[name = string("imag")];
|
| 23 |
+
tensor<fp32, [1, 201, 1, 3000]> var_21 = mul(x = real, y = real)[name = string("op_21")];
|
| 24 |
+
tensor<fp32, [1, 201, 1, 3000]> var_22 = mul(x = imag, y = imag)[name = string("op_22")];
|
| 25 |
+
tensor<fp32, [1, 201, 1, 3000]> input = add(x = var_21, y = var_22)[name = string("input")];
|
| 26 |
+
string var_24_pad_type_0 = const()[name = string("op_24_pad_type_0"), val = string("valid")];
|
| 27 |
+
tensor<int32, [2]> var_24_strides_0 = const()[name = string("op_24_strides_0"), val = tensor<int32, [2]>([1, 1])];
|
| 28 |
+
tensor<int32, [4]> var_24_pad_0 = const()[name = string("op_24_pad_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 29 |
+
tensor<int32, [2]> var_24_dilations_0 = const()[name = string("op_24_dilations_0"), val = tensor<int32, [2]>([1, 1])];
|
| 30 |
+
int32 var_24_groups_0 = const()[name = string("op_24_groups_0"), val = int32(1)];
|
| 31 |
+
tensor<fp32, [1, 80, 1, 3000]> var_24 = conv(dilations = var_24_dilations_0, groups = var_24_groups_0, pad = var_24_pad_0, pad_type = var_24_pad_type_0, strides = var_24_strides_0, weight = self_mel_weight, x = input)[name = string("op_24")];
|
| 32 |
+
tensor<int32, [4]> var_27_begin_0 = const()[name = string("op_27_begin_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 33 |
+
tensor<int32, [4]> var_27_end_0 = const()[name = string("op_27_end_0"), val = tensor<int32, [4]>([1, 80, 1, 3000])];
|
| 34 |
+
tensor<bool, [4]> var_27_end_mask_0 = const()[name = string("op_27_end_mask_0"), val = tensor<bool, [4]>([true, true, false, true])];
|
| 35 |
+
tensor<bool, [4]> var_27_squeeze_mask_0 = const()[name = string("op_27_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, true, false])];
|
| 36 |
+
tensor<fp32, [1, 80, 3000]> var_27 = slice_by_index(begin = var_27_begin_0, end = var_27_end_0, end_mask = var_27_end_mask_0, squeeze_mask = var_27_squeeze_mask_0, x = var_24)[name = string("op_27")];
|
| 37 |
+
fp32 const_0 = const()[name = string("const_0"), val = fp32(0x1.fffffep+127)];
|
| 38 |
+
tensor<fp32, [1, 80, 3000]> clip_0 = clip(alpha = var_3, beta = const_0, x = var_27)[name = string("clip_0")];
|
| 39 |
+
fp32 log_0_epsilon_0 = const()[name = string("log_0_epsilon_0"), val = fp32(0x1p-149)];
|
| 40 |
+
tensor<fp32, [1, 80, 3000]> log_0 = log(epsilon = log_0_epsilon_0, x = clip_0)[name = string("log_0")];
|
| 41 |
+
fp32 mul_0_y_0 = const()[name = string("mul_0_y_0"), val = fp32(0x1.bcb7b2p-2)];
|
| 42 |
+
tensor<fp32, [1, 80, 3000]> mul_0 = mul(x = log_0, y = mul_0_y_0)[name = string("mul_0")];
|
| 43 |
+
tensor<int32, [2]> var_31_axes_0 = const()[name = string("op_31_axes_0"), val = tensor<int32, [2]>([1, 2])];
|
| 44 |
+
tensor<fp32, [1, 1, 1]> var_31 = reduce_max(axes = var_31_axes_0, keep_dims = var_14, x = mul_0)[name = string("op_31")];
|
| 45 |
+
fp32 var_32 = const()[name = string("op_32"), val = fp32(0x1p+3)];
|
| 46 |
+
tensor<fp32, [1, 1, 1]> var_33 = sub(x = var_31, y = var_32)[name = string("op_33")];
|
| 47 |
+
tensor<fp32, [1, 80, 3000]> log = maximum(x = mul_0, y = var_33)[name = string("log")];
|
| 48 |
+
fp32 var_35 = const()[name = string("op_35"), val = fp32(0x1p+2)];
|
| 49 |
+
tensor<fp32, [1, 80, 3000]> var_36 = add(x = log, y = var_35)[name = string("op_36")];
|
| 50 |
+
fp32 _inversed_38_y_0 = const()[name = string("_inversed_38_y_0"), val = fp32(0x1p-2)];
|
| 51 |
+
tensor<fp32, [1, 80, 3000]> _inversed_38 = mul(x = var_36, y = _inversed_38_y_0)[name = string("_inversed_38")];
|
| 52 |
+
string cast_2_dtype_0 = const()[name = string("cast_2_dtype_0"), val = string("fp16")];
|
| 53 |
+
tensor<fp16, [1, 80, 3000]> mel = cast(dtype = cast_2_dtype_0, x = _inversed_38)[name = string("cast_3")];
|
| 54 |
+
} -> (mel);
|
| 55 |
+
}
|
mel.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea98097dba120b4236368cca2bd6ae5202d246faddc9d46b91964646b48a9f10
|
| 3 |
+
size 836352
|