Add model card and MIT licence
Browse files
README.md
CHANGED
|
@@ -17,17 +17,22 @@ a speech restoration model, rebuilt to run on an iPhone's Neural Engine. Used by
|
|
| 17 |
Excerpt, an iOS audiobook player, to lift noise and muffling out of narration
|
| 18 |
on the device.
|
| 19 |
|
| 20 |
-
16 kHz in, 48 kHz out, duration preserved.
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Contents
|
| 25 |
|
| 26 |
| File | Precision | Size | Fixed input |
|
| 27 |
|---|---|---|---|
|
| 28 |
-
| `sidon_encoder_ane.mlpackage` | fp16 | 468 MB | `feats` `[1, 300, 160]` -> `hidden` `[1, 300, 1024]` |
|
| 29 |
| `sidon_decoder_ane.mlpackage` | fp16 | 101 MB | `feat` `[1, 1024, 68]` -> `[1, 1, 65280]` |
|
| 30 |
-
| `sidon_fbank.bin` | float32 | 84 KB | Front-end constants: 400-tap Povey window and 257 x 80 mel filters |
|
| 31 |
|
| 32 |
`.mlpackage` files are uncompiled. Compile them on the device with
|
| 33 |
`MLModel.compileModel(at:)` and cache the result; the first compile can take a
|
|
@@ -83,6 +88,35 @@ A backgrounded iOS app cannot use the GPU, so for long audio that is the
|
|
| 83 |
comparison that matters.
|
| 84 |
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
## What it does
|
| 87 |
|
| 88 |
Sidon re-synthesises speech from w2v-BERT semantic features rather than repairing
|
|
@@ -94,4 +128,5 @@ sample-accurate restoration of the original recording.
|
|
| 94 |
|
| 95 |
MIT, inherited from the upstream model — see `LICENSE`. The model, its training
|
| 96 |
and its weights are the work of the Sidon authors (Wataru Nakata, Yuki Saito);
|
| 97 |
-
this repository contributes
|
|
|
|
|
|
| 17 |
Excerpt, an iOS audiobook player, to lift noise and muffling out of narration
|
| 18 |
on the device.
|
| 19 |
|
| 20 |
+
16 kHz in, 48 kHz out, duration preserved.
|
| 21 |
+
|
| 22 |
+
Two versions, with the same file names, inputs and outputs:
|
| 23 |
+
|
| 24 |
+
- **The repository root** holds upstream's weights, unchanged. What changed is
|
| 25 |
+
the graph around them, so that it compiles for the Neural Engine.
|
| 26 |
+
- **`v2/`** holds the same conversion of a fine-tuned Sidon, trained to remove
|
| 27 |
+
a warble upstream adds on some vowels. See [v2: fine-tuned](#v2-fine-tuned).
|
| 28 |
|
| 29 |
## Contents
|
| 30 |
|
| 31 |
| File | Precision | Size | Fixed input |
|
| 32 |
|---|---|---|---|
|
| 33 |
+
| `sidon_encoder_ane.mlpackage` | fp16 | 468 MB (`v2/`: 458 MB) | `feats` `[1, 300, 160]` -> `hidden` `[1, 300, 1024]` |
|
| 34 |
| `sidon_decoder_ane.mlpackage` | fp16 | 101 MB | `feat` `[1, 1024, 68]` -> `[1, 1, 65280]` |
|
| 35 |
+
| `sidon_fbank.bin` | float32 | 84 KB | Front-end constants: 400-tap Povey window and 257 x 80 mel filters; identical in both |
|
| 36 |
|
| 37 |
`.mlpackage` files are uncompiled. Compile them on the device with
|
| 38 |
`MLModel.compileModel(at:)` and cache the result; the first compile can take a
|
|
|
|
| 88 |
comparison that matters.
|
| 89 |
|
| 90 |
|
| 91 |
+
## v2: fine-tuned
|
| 92 |
+
|
| 93 |
+
Upstream Sidon adds a warble to some vowels, worst on "a" sounds, like a reverb
|
| 94 |
+
whose pitch shifts. It does this on clean, uncompressed input too, so it is the
|
| 95 |
+
model's own habit rather than a codec artefact.
|
| 96 |
+
|
| 97 |
+
`v2/` is upstream with small trained adjustments to both the encoder and the
|
| 98 |
+
decoder, folded into plain weights before conversion. It was trained on
|
| 99 |
+
audiobook narration compressed through real audiobook codec chains (MP3, AAC,
|
| 100 |
+
HE-AAC, Opus, Vorbis; one to three generations). Everywhere except the warbling
|
| 101 |
+
vowels it was taught to reproduce upstream's own output, which keeps upstream's
|
| 102 |
+
studio sound and the narrator's voice. On the vowels where upstream warbles, it
|
| 103 |
+
was taught to reproduce the original recording instead.
|
| 104 |
+
|
| 105 |
+
Measured on 84 held-out clips from compressed input:
|
| 106 |
+
|
| 107 |
+
| | Upstream | v2 |
|
| 108 |
+
|---|---|---|
|
| 109 |
+
| NISQA quality score | 4.74 | 4.77 |
|
| 110 |
+
| Vowels over the warble threshold | 20.3 % | 9.3 % |
|
| 111 |
+
| Tone movement against the original (1.0 = as lively) | 0.99 | 0.95 |
|
| 112 |
+
|
| 113 |
+
In blind listening on six held-out phrases, words heard as warbling fell from
|
| 114 |
+
10 to 4. Listening tests used one narrator, and some phrases still warble.
|
| 115 |
+
|
| 116 |
+
The Core ML conversion is the same as the root's. The encoder runs 99.4 % on
|
| 117 |
+
the Neural Engine (root: 99.9 %), and both builds are equally close to their
|
| 118 |
+
PyTorch models.
|
| 119 |
+
|
| 120 |
## What it does
|
| 121 |
|
| 122 |
Sidon re-synthesises speech from w2v-BERT semantic features rather than repairing
|
|
|
|
| 128 |
|
| 129 |
MIT, inherited from the upstream model — see `LICENSE`. The model, its training
|
| 130 |
and its weights are the work of the Sidon authors (Wataru Nakata, Yuki Saito);
|
| 131 |
+
this repository contributes the Core ML conversion and, in `v2/`, the
|
| 132 |
+
fine-tune.
|