Upload folder using huggingface_hub
Browse files- LICENSE +21 -0
- README.md +100 -0
- ReDimNet2B6.mlmodelc/analytics/coremldata.bin +3 -0
- ReDimNet2B6.mlmodelc/coremldata.bin +3 -0
- ReDimNet2B6.mlmodelc/model.mil +0 -0
- ReDimNet2B6.mlmodelc/weights/weight.bin +3 -0
- config.json +25 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Palabra.ai
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- multilingual
|
| 5 |
+
tags:
|
| 6 |
+
- coreml
|
| 7 |
+
- speaker-verification
|
| 8 |
+
- speaker-embedding
|
| 9 |
+
- voice-identity
|
| 10 |
+
base_model: PalabraAI/redimnet2
|
| 11 |
+
library_name: coreml
|
| 12 |
+
pipeline_tag: audio-classification
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# ReDimNet2-B6 Core ML Speaker Embeddings
|
| 16 |
+
|
| 17 |
+
ReDimNet2-B6 produces local speaker embeddings for comparing clean voice
|
| 18 |
+
samples. It does not diarize audio or assign names by itself.
|
| 19 |
+
|
| 20 |
+
## Model
|
| 21 |
+
|
| 22 |
+
| Property | Value |
|
| 23 |
+
|---|---:|
|
| 24 |
+
| Parameters | 12.3 million |
|
| 25 |
+
| Format | Compiled Core ML, Float16 weights |
|
| 26 |
+
| Compiled size | 24.7 MiB |
|
| 27 |
+
| Input | 96,000 mono Float32 samples |
|
| 28 |
+
| Sample rate | 16 kHz |
|
| 29 |
+
| Window | 6 seconds |
|
| 30 |
+
| Output | 192-dimensional L2-normalized embedding |
|
| 31 |
+
| Minimum deployment | macOS 15 / iOS 18 |
|
| 32 |
+
|
| 33 |
+
The checkpoint was trained on VoxBlink2 and VoxCeleb2. The fixed six-second
|
| 34 |
+
shape avoids the slow Core ML fallback observed with a flexible waveform shape.
|
| 35 |
+
Applications should repeat clean two-to-six-second speech to fill the input and
|
| 36 |
+
center-crop longer samples.
|
| 37 |
+
|
| 38 |
+
## Files
|
| 39 |
+
|
| 40 |
+
| File | Size | Description |
|
| 41 |
+
|---|---:|---|
|
| 42 |
+
| `ReDimNet2B6.mlmodelc/` | 24.7 MiB | Precompiled Core ML model |
|
| 43 |
+
| `config.json` | <2 KiB | Input, output, source revision, checksum, and validation metadata |
|
| 44 |
+
| `README.md` | <4 KiB | This model card |
|
| 45 |
+
| `LICENSE` | 1.0 KiB | MIT license from the upstream implementation |
|
| 46 |
+
|
| 47 |
+
## Performance
|
| 48 |
+
|
| 49 |
+
Measured on an Apple M2 Max after two warm-up predictions:
|
| 50 |
+
|
| 51 |
+
| Measurement | Result | Meaning |
|
| 52 |
+
|---|---:|---|
|
| 53 |
+
| Warm six-second inference | 13.8 ms | One voice-profile embedding |
|
| 54 |
+
| Warm throughput | 72.6 embeddings/s | Repeated six-second windows after warm-up |
|
| 55 |
+
| Meeting pilot equal-error rate, 2-second clips | 1.50% | Lower is better; WeSpeaker Core ML was 5.17% |
|
| 56 |
+
| Meeting pilot equal-error rate, 3-second clips | 0.00% | Lower is better; WeSpeaker Core ML was 1.50% |
|
| 57 |
+
| LibriSpeech test-clean equal-error rate, 40 speakers | 0.00% | Two- and three-second controls |
|
| 58 |
+
|
| 59 |
+
The meeting pilot contains five recurring speakers and is not a universal
|
| 60 |
+
quality claim. Thresholds must be calibrated for the intended microphones,
|
| 61 |
+
languages, and acoustic conditions. Speaker embeddings are useful for labeling;
|
| 62 |
+
they are not biometric authentication and do not protect against voice spoofing.
|
| 63 |
+
|
| 64 |
+
## Python usage
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
import coremltools as ct
|
| 68 |
+
import numpy as np
|
| 69 |
+
|
| 70 |
+
model = ct.models.CompiledMLModel("ReDimNet2B6.mlmodelc")
|
| 71 |
+
audio = np.zeros((1, 96_000), dtype=np.float32)
|
| 72 |
+
embedding = model.predict({"audio": audio})["embedding"]
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## speech-swift
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
speech embed-speaker voice.wav --engine redimnet2 --json
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
```swift
|
| 82 |
+
import SpeechVAD
|
| 83 |
+
|
| 84 |
+
let model = try await ReDimNet2SpeakerModel.fromPretrained()
|
| 85 |
+
let embedding = try model.embed(audio: samples, sampleRate: 16_000)
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Source
|
| 89 |
+
|
| 90 |
+
Converted from the official
|
| 91 |
+
[PalabraAI/ReDimNet2](https://github.com/PalabraAI/redimnet2) B6
|
| 92 |
+
`vb2+vox2_v0` large-margin checkpoint. The source revision and checkpoint
|
| 93 |
+
SHA-256 are recorded in `config.json`.
|
| 94 |
+
|
| 95 |
+
## Links
|
| 96 |
+
|
| 97 |
+
- [speech-swift](https://github.com/soniqo/speech-swift) — Apple SDK
|
| 98 |
+
- [Docs](https://soniqo.audio/getting-started) — install and CLI docs
|
| 99 |
+
- [soniqo.audio](https://soniqo.audio)
|
| 100 |
+
- [blog](https://soniqo.audio/blog)
|
ReDimNet2B6.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fa08bf1dda00e0fa91ba683fdd0665880bf8f8a0bb4e42f40d844ad81b0e839
|
| 3 |
+
size 243
|
ReDimNet2B6.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81a52a3b06ef39f27a242e47b51d6d00b0dce4e57809d6c8b68677d89bf3e66b
|
| 3 |
+
size 518
|
ReDimNet2B6.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ReDimNet2B6.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc2144871b34862429a4c82b28a413e201b52c89e6e66414b61fe9ba0e4ad7a2
|
| 3 |
+
size 25423808
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "redimnet2-b6-speaker-coreml",
|
| 3 |
+
"sample_rate": 16000,
|
| 4 |
+
"input_samples": 96000,
|
| 5 |
+
"input_duration_seconds": 6.0,
|
| 6 |
+
"minimum_recommended_duration_seconds": 2.0,
|
| 7 |
+
"embedding_dimension": 192,
|
| 8 |
+
"input_name": "audio",
|
| 9 |
+
"output_name": "embedding",
|
| 10 |
+
"output_normalized": true,
|
| 11 |
+
"checkpoint": "b6-vb2+vox2_v0-lm.pt",
|
| 12 |
+
"checkpoint_sha256": "e0a7d340a92f798720d1208949aa6a6bd0cddcb0ba7d4cec33596a17a484e6a2",
|
| 13 |
+
"source_repository": "https://github.com/PalabraAI/redimnet2.git",
|
| 14 |
+
"source_revision": "2a8d15f65b1dfb5d73fede2f11ee42bcccca3035",
|
| 15 |
+
"compute_precision": "float16",
|
| 16 |
+
"compiled_model": "ReDimNet2B6.mlmodelc",
|
| 17 |
+
"compiled_size_bytes": 25931707,
|
| 18 |
+
"validation": {
|
| 19 |
+
"pytorch_coreml_cosine": 0.9999898663545027,
|
| 20 |
+
"max_absolute_error": 0.0011521875858306885,
|
| 21 |
+
"output_l2_norm": 0.9999155402183533,
|
| 22 |
+
"warm_latency_median_ms": 13.766916505119298,
|
| 23 |
+
"warm_latency_min_ms": 13.575500008300878
|
| 24 |
+
}
|
| 25 |
+
}
|