Yehor commited on
Commit
eec75f2
·
verified ·
1 Parent(s): 2dd2f0b

Upload 4 files

Browse files
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: coreml
3
+ license: mit
4
+ tags:
5
+ - coreml
6
+ - speaker-verification
7
+ - speaker-embedding
8
+ - diarization
9
+ - redimnet
10
+ - audio
11
+ pipeline_tag: audio-classification
12
+ ---
13
+
14
+ # ReDimNet2-B6 Core ML Speaker Embeddings
15
+
16
+ This directory contains a Core ML conversion of the ReDimNet2-B6 speaker embedding model from [`PalabraAI/redimnet2`](https://github.com/PalabraAI/redimnet2).
17
+
18
+ The model is used by software to assign deterministic speaker labels inside each audio file and prefix transcriptions with markers such as:
19
+
20
+ ```text
21
+ {SPEAKER_1} Добрий день.
22
+ {SPEAKER_2} Вітаю.
23
+ ```
24
+
25
+ ## Files
26
+
27
+ ```text
28
+ ReDimNet2-B6.mlpackage/
29
+ ```
30
+
31
+ ## Model Details
32
+
33
+ - Source model: ReDimNet2-B6
34
+ - Upstream repository: `PalabraAI/redimnet2`
35
+ - Checkpoint: `b6-vb2+vox2_v0-lm.pt`
36
+ - Task: speaker embedding extraction
37
+ - Input: mono 16 kHz waveform
38
+ - Output: L2-normalized speaker embedding
39
+ - Core ML input name: `audio`
40
+ - Core ML output name: `embedding`
41
+
42
+ The converted package expects a fixed waveform input of `160320` samples, about `10.02s` at 16 kHz. The software pads shorter chunks and center-crops longer chunks before inference.
43
+
44
+ ## Convert
45
+
46
+ From the repository root:
47
+
48
+ ```bash
49
+ uv run --with torch --with torchaudio --with scipy --with coremltools \
50
+ scripts/convert_redimnet2_coreml.py \
51
+ --output Models/speaker/ReDimNet2-B6.mlpackage
52
+ ```
53
+
54
+ ## Notes
55
+
56
+ The model produces embeddings, not speaker IDs. The software performs per-file online cosine clustering over chunk embeddings. Speaker labels are deterministic within a source audio file, but `SPEAKER_1` in one file is not the same person as `SPEAKER_1` in another file.
ReDimNet2-B6.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f44226ecb38ccb0b449e0d50e24c7e2fdb8b51eb5d336ffa6ac36db409ecff8
3
+ size 473793
ReDimNet2-B6.mlpackage/Data/com.apple.CoreML/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff8c5079f4b38248542e0de8986819fb9711aba57866c8b2f685dc546acac020
3
+ size 25423808
ReDimNet2-B6.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "C559E5FD-3CB1-4D8F-920F-36DF1172CFC4": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "DFDBC7D9-366E-47AD-AA7E-B664D19AD7D2": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Specification",
13
+ "name": "model.mlmodel",
14
+ "path": "com.apple.CoreML/model.mlmodel"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "DFDBC7D9-366E-47AD-AA7E-B664D19AD7D2"
18
+ }