wavenet-coding 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wavenet_coding-0.2.0/wavenet_coding.egg-info → wavenet_coding-0.2.1}/PKG-INFO +41 -42
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/README.md +40 -41
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/scripts/evaluate.py +82 -19
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/scripts/inference.py +95 -4
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/scripts/prepare_data.py +20 -2
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/scripts/train.py +144 -72
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/setup.py +1 -1
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/__init__.py +8 -1
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/codec2.py +80 -172
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/evaluation.py +30 -26
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/inference.py +90 -81
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/model.py +295 -53
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1/wavenet_coding.egg-info}/PKG-INFO +41 -42
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/LICENSE +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/MANIFEST.in +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/pyproject.toml +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/requirements.txt +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/scripts/export_model.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/setup.cfg +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/configs.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/dataset.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/entropy_coding.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/export.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding/loss.py +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding.egg-info/SOURCES.txt +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding.egg-info/dependency_links.txt +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding.egg-info/requires.txt +0 -0
- {wavenet_coding-0.2.0 → wavenet_coding-0.2.1}/wavenet_coding.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wavenet-coding
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: WaveNet Based Low Rate Speech Coding (Parametric & Waveform)
|
|
5
5
|
Home-page: https://github.com/wq2012/wavenet_coding
|
|
6
6
|
Author: Quan Wang
|
|
@@ -41,7 +41,7 @@ Dynamic: summary
|
|
|
41
41
|
|
|
42
42
|
**This is not an officially supported Google product.**
|
|
43
43
|
|
|
44
|
-
> **Open-Source Paper Reproduction Notice**: This repository is a clean-room, open-source reproduction of the paper **W. Bastiaan Kleijn, Felicia S. C. Lim, Alejandro Luebs, Jan Skoglund, Florian Stimberg, Quan Wang, and Thomas C. Walters, *"WaveNet Based Low Rate Speech Coding,"* IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 676–680, 2018 ([arXiv:1712.01120](https://arxiv.org/abs/1712.01120))**, created after the original publication using open-source frameworks (`TensorFlow 2`, `NumPy`, `SciPy`, `SafeTensors`, `TFLite`, `GGUF`), open-source C reference codec libraries (`
|
|
44
|
+
> **Open-Source Paper Reproduction Notice**: This repository is a clean-room, open-source reproduction of the paper **W. Bastiaan Kleijn, Felicia S. C. Lim, Alejandro Luebs, Jan Skoglund, Florian Stimberg, Quan Wang, and Thomas C. Walters, *"WaveNet Based Low Rate Speech Coding,"* IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 676–680, 2018 ([arXiv:1712.01120](https://arxiv.org/abs/1712.01120))**, created after the original publication using open-source frameworks (`TensorFlow 2`, `NumPy`, `SciPy`, `SafeTensors`, `TFLite`, `GGUF`), open-source C reference codec libraries (`libspeex`, `libvo-amrwbenc`, `libopencore-amrwb`) plus a pure-Python 50-bit/20ms `Codec 2` 2400 bps implementation, ITU-T P.862.2 wideband `PESQ` and `STOI`, and public multi-speaker speech datasets (**LibriSpeech** and **CSTR VCTK**).
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -52,9 +52,9 @@ Traditional speech coders fall into two families:
|
|
|
52
52
|
2. **Parametric coders** (Sections 2.2 & 2.4): Extract compact vocal-tract, pitch, and energy parameters every 10–20 ms (e.g., **Codec 2** at **2.4 kb/s**) and synthesize a perceptually plausible waveform at the receiver.
|
|
53
53
|
|
|
54
54
|
This package implements all four core components introduced in **Kleijn et al. (ICASSP 2018)**:
|
|
55
|
-
- **Closed-Loop WaveNet Waveform Coding (`WW`, Section 2.3)**: Uses a causal dilated WaveNet (`q^(i)(x_i | x_0, ..., x_{i-1})`) inside a closed quantization loop over 256-level 8-bit μ-law samples (`n_i = Q(x_i)`), paired with a bit-exact 32-bit integer arithmetic coder to losslessly compress 16 kHz 8-bit μ-law speech from **128.00 kb/s** down to **
|
|
56
|
-
- **Codec 2 Conditioned Parametric WaveNet Coding (`WP` / `W_wo` / `W_w`, Section 2.4)**: Encodes 16 kHz speech into a serialized **2.4 kb/s** bitstream (**50 bits per 20 ms block**: 36 bits LSP spectral envelope, 7 bits fundamental frequency F0, 5 bits energy, and 2 voicing flags; `36 + 7 + 5 + 2 = 50 bits / 20 ms`), unpacks the bitstream at the receiver with zero reference access, and synthesizes 16 kHz wideband speech with implicit 4–8 kHz bandwidth extension.
|
|
57
|
-
- **Likelihood-Guided Mode Switching (`HybridModeSwitchingCodec`, Section 2.4)**: Dynamically switches between 2.4 kb/s parametric coding and closed-loop arithmetic waveform coding on 20 ms frames where the parametric negative log-likelihood exceeds a threshold (`
|
|
55
|
+
- **Closed-Loop WaveNet Waveform Coding (`WW`, Section 2.3)**: Uses a causal dilated WaveNet (`q^(i)(x_i | x_0, ..., x_{i-1})`) inside a closed quantization loop over 256-level 8-bit μ-law samples (`n_i = Q(x_i)`), paired with a bit-exact 32-bit integer arithmetic coder to losslessly compress 16 kHz 8-bit μ-law speech from **128.00 kb/s** down to **81.99 kb/s** (`5.1243 bits/sample` active arithmetic coded bitrate on LibriSpeech `test-clean`) and **77.17 kb/s** (`4.8234 bits/sample` on VCTK), with a theoretical conditional entropy lower bound `H̄` of **78.77 kb/s** (`4.9232 bits/sample`) on LibriSpeech and **77.81 kb/s** (`4.8631 bits/sample`) on VCTK.
|
|
56
|
+
- **Codec 2 Conditioned Parametric WaveNet Coding (`WP` / `W_wo` / `W_w`, Section 2.4)**: Encodes 16 kHz speech into a serialized **2.4 kb/s** bitstream (**43-bit** unquantized stream header + **50 bits per 20 ms block**: 36 bits LSP spectral envelope, 7 bits fundamental frequency F0, 5 bits energy, and 2 voicing flags; `36 + 7 + 5 + 2 = 50 bits / 20 ms`), unpacks the bitstream at the receiver with zero reference access, and synthesizes 16 kHz wideband speech with implicit 4–8 kHz bandwidth extension (`1.111%` high-band energy for `W_w` and `0.880%` for `W_wo` on LibriSpeech).
|
|
57
|
+
- **Likelihood-Guided Mode Switching (`HybridModeSwitchingCodec`, Section 2.4)**: Dynamically switches between 2.4 kb/s parametric coding and closed-loop arithmetic waveform coding on 20 ms frames where the teacher-forced parametric negative log-likelihood exceeds a threshold (`3.304 kb/s` on LibriSpeech and `2.842 kb/s` on VCTK).
|
|
58
58
|
- **GE2E Speaker Verification & Triangle Discriminability (`build_speaker_verifier`, Section 3.4)**: Implements the 3-layer Projected-LSTM (`LSTMP`) speaker embedding network (128 LSTM units projected to 64 dimensions per layer over 40-channel frame-level log-Mel filterbank features) trained with Generalized End-to-End (`GE2E`) softmax loss to evaluate speaker identity preservation across 8-bit μ-law speech, speaker-disjoint Parametric WaveNet (`W_wo`), and speaker-overlapping Parametric WaveNet (`W_w`).
|
|
59
59
|
|
|
60
60
|
<p align="center">
|
|
@@ -69,11 +69,11 @@ All five pretrained models are trained on real multi-speaker LibriSpeech + VCTK
|
|
|
69
69
|
|
|
70
70
|
| Model Name | Hugging Face Repository | Task / Paper Section | Initial Eval Metric | Final Eval Metric | Exported Formats |
|
|
71
71
|
| :--- | :--- | :--- | :---: | :---: | :--- |
|
|
72
|
-
| **`wavenet_waveform_coder` (`WW`)** | [`wq2012/wavenet-waveform-coder`](https://huggingface.co/wq2012/wavenet-waveform-coder) | Closed-Loop Waveform Coder (Sec. 2.3 & 3.2) | 7.0186 bits/sample (4.8649 nats) | **4.
|
|
73
|
-
| **`wavenet_parametric_2400_speaker_independent` (`W_wo`)** | [`wq2012/wavenet-parametric-2400-speaker-independent`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-independent) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Disjoint (Sec. 2.4 & 3.3) | 7.0185 bits/sample (4.8648 nats) | **4.
|
|
74
|
-
| **`wavenet_parametric_2400_speaker_overlapping` (`W_w`)** | [`wq2012/wavenet-parametric-2400-speaker-overlapping`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-overlapping) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Overlapping (Sec. 3.3 & 3.4) | 7.0186 bits/sample (4.
|
|
75
|
-
| **`wavenet_speaker_verifier_mulaw`** | [`wq2012/wavenet-speaker-verifier-mulaw`](https://huggingface.co/wq2012/wavenet-speaker-verifier-mulaw) | 3-Layer LSTMP GE2E Speaker Verifier on 8-bit μ-law Speech (Sec. 3.4) |
|
|
76
|
-
| **`wavenet_speaker_verifier_coded`** | [`wq2012/wavenet-speaker-verifier-coded`](https://huggingface.co/wq2012/wavenet-speaker-verifier-coded) | 3-Layer LSTMP GE2E Speaker Verifier on 2.4 kb/s Coded Speech (Sec. 3.4) |
|
|
72
|
+
| **`wavenet_waveform_coder` (`WW`)** | [`wq2012/wavenet-waveform-coder`](https://huggingface.co/wq2012/wavenet-waveform-coder) | Closed-Loop Waveform Coder (Sec. 2.3 & 3.2) | 7.0186 bits/sample (4.8649 nats) | **4.2561 bits/sample** (2.9501 nats) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
73
|
+
| **`wavenet_parametric_2400_speaker_independent` (`W_wo`)** | [`wq2012/wavenet-parametric-2400-speaker-independent`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-independent) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Disjoint (Sec. 2.4 & 3.3) | 7.0185 bits/sample (4.8648 nats) | **4.3116 bits/sample** (2.9886 nats) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
74
|
+
| **`wavenet_parametric_2400_speaker_overlapping` (`W_w`)** | [`wq2012/wavenet-parametric-2400-speaker-overlapping`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-overlapping) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Overlapping (Sec. 3.3 & 3.4) | 7.0186 bits/sample (4.8650 nats) | **4.3116 bits/sample** (2.9886 nats, train: 4.1180) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
75
|
+
| **`wavenet_speaker_verifier_mulaw`** | [`wq2012/wavenet-speaker-verifier-mulaw`](https://huggingface.co/wq2012/wavenet-speaker-verifier-mulaw) | 3-Layer LSTMP GE2E Speaker Verifier on 8-bit μ-law Speech (Sec. 3.4) | 0.9159 GE2E loss (12.50% eval EER) | **0.1715 GE2E loss (2.68% eval EER)** | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
76
|
+
| **`wavenet_speaker_verifier_coded`** | [`wq2012/wavenet-speaker-verifier-coded`](https://huggingface.co/wq2012/wavenet-speaker-verifier-coded) | 3-Layer LSTMP GE2E Speaker Verifier on 2.4 kb/s Coded Speech (Sec. 3.4) | 1.2813 GE2E loss (15.62% eval EER) | **0.5116 GE2E loss (12.50% eval EER)** | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
77
77
|
|
|
78
78
|
- **Interactive Demo Space**: [**`wq2012/wavenet-coding-demo`**](https://huggingface.co/spaces/wq2012/wavenet-coding-demo)
|
|
79
79
|
|
|
@@ -92,10 +92,10 @@ In Section 3.2 of the paper, the average conditional entropy `H̄` (Eq. 4, theor
|
|
|
92
92
|
| Dataset / Split | Mean Conditional Entropy H̄ (bits/sample) | Theoretical Lower-Bound Bitrate (kb/s) | Cross-Entropy Rate R (bits/sample) | Cross-Entropy Bitrate (kb/s) | Active Arithmetic Coded Rate (bits/sample) | Active Arithmetic Bitrate (kb/s) | Arithmetic Coder Lossless Match Rate |
|
|
93
93
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
94
94
|
| **Paper Reported (WSJ0, Sec. 3.2, 60-layer conditioned WW)** | 2.6113 (1.81 nats) | 41.78 | 2.6546 (1.84 nats) | 42.47 (~42 kb/s) | — | — | — |
|
|
95
|
-
| **Reproduced — LibriSpeech (`test-clean`, 20-layer unconditioned WW)** | **4.
|
|
96
|
-
| **Reproduced — VCTK Corpus (20-layer unconditioned WW)** | **4.
|
|
95
|
+
| **Reproduced — LibriSpeech (`test-clean`, 20-layer unconditioned WW)** | **4.9232** | **78.77** | **5.4089** (3.7491 nats) | **86.54** | **5.1243** | **81.99** | **100.0% (16/16)** |
|
|
96
|
+
| **Reproduced — VCTK Corpus (20-layer unconditioned WW)** | **4.8631** | **77.81** | **4.9755** (3.4488 nats) | **79.61** | **4.8234** | **77.17** | **100.0% (16/16)** |
|
|
97
97
|
|
|
98
|
-
> **Architectural Scaling Note**: The original ICASSP 2018 paper trained a 60-layer conditioned WaveNet (`3` blocks × `10` layers + conditioning stack) on `32,580` WSJ0 utterances to reach `2.65 bits/sample` (`42 kb/s`). Our lightweight CPU-reproducible `20`-layer unconditioned closed-loop WaveNet (`2` blocks × `10` layers) reduces the 16 kHz 8-bit μ-law bitrate from **128.00 kb/s** to **
|
|
98
|
+
> **Architectural Scaling Note**: The original ICASSP 2018 paper trained a 60-layer conditioned WaveNet (`3` blocks × `10` layers + conditioning stack) on `32,580` WSJ0 utterances to reach `2.65 bits/sample` (`42 kb/s`). Our lightweight CPU-reproducible `20`-layer unconditioned closed-loop WaveNet (`2` blocks × `10` layers) reduces the 16 kHz 8-bit μ-law bitrate from **128.00 kb/s** to **77.17–81.99 kb/s** (`35.9%–39.7%` lossless compression savings) with **100% bit-exact reconstruction** across all 16 held-out utterances per corpus.
|
|
99
99
|
|
|
100
100
|
#### Paper Figure 2 vs. Reproduced Instantaneous Entropy Profile
|
|
101
101
|
|
|
@@ -108,13 +108,13 @@ As observed in Section 3.2 of the paper, the instantaneous entropy `H_i` is lowe
|
|
|
108
108
|
|
|
109
109
|
### 2. Parametric 2.4 kb/s & Reference Codec Comparison (Section 3.3)
|
|
110
110
|
|
|
111
|
-
Section 3.3 compares the 16 kHz Reference, Closed-Loop WaveNet Waveform Coder (`WW`), Likelihood-Guided Hybrid Mode-Switching (`WW + W_w`), **AMR-WB (`23.05 kb/s` via `libvo-amrwbenc` + `libopencore-amrwb`)**, **Parametric WaveNet with speaker overlap (`W_w, 2.4 kb/s`)**, **Parametric WaveNet without speaker overlap (`W_wo, 2.4 kb/s`)**, **MELP (`2.4 kb/s`)**, **Codec 2 (`2.4 kb/s`
|
|
111
|
+
Section 3.3 compares the 16 kHz Reference, Closed-Loop WaveNet Waveform Coder (`WW`), Likelihood-Guided Hybrid Mode-Switching (`WW + W_w`), **AMR-WB (`23.05 kb/s` via `libvo-amrwbenc` + `libopencore-amrwb`)**, **Parametric WaveNet with speaker overlap (`W_w, 2.4 kb/s`)**, **Parametric WaveNet without speaker overlap (`W_wo, 2.4 kb/s`)**, **MELP (`2.4 kb/s`)**, **Codec 2 (`2.4 kb/s`)**, and **Speex (`2.15 kb/s` via `libspeex`)**.
|
|
112
112
|
|
|
113
113
|
Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s`) implementation:
|
|
114
|
-
1. **Short-Time Objective Intelligibility (`STOI`) & Spectral Distortion (`MCD` / `LSD`)**: At **2.4 kb/s**, both Parametric WaveNet models (`W_w` and `W_wo`) achieve higher intelligibility (`STOI = 0.
|
|
115
|
-
2. **Pitch Tracking (`F0 RMSE`)**: Conditioning the 16 kHz Parametric WaveNet decoder on the quantized 7-bit F0 contour yields lower voiced pitch error (`
|
|
116
|
-
3. **Implicit 4–8 kHz Bandwidth Extension**: Whereas 8 kHz narrow-band codecs (`MELP`, `Codec 2`, `Speex`) contain negligible energy above 4 kHz (`0.
|
|
117
|
-
4. **ITU-T P.862.2 Wideband PESQ (`MOS-LQO`)**: Because ITU-T P.862.2 `PESQ-WB` penalizes phase-asynchronous generative vocoders without high-band waveform locking, all 2.15–2.4 kb/s parametric vocoders score in the `1.
|
|
114
|
+
1. **Short-Time Objective Intelligibility (`STOI`) & Spectral Distortion (`MCD` / `LSD`)**: At **2.4 kb/s**, both Parametric WaveNet models (`W_w` and `W_wo`) achieve higher intelligibility (`STOI = 0.818` on LibriSpeech; `0.856` on VCTK) and significantly lower spectral envelope distortion (`MCD = 5.452–5.644 dB`, `LSD = 6.100–6.204 dB` on LibriSpeech; `MCD = 5.774–5.821 dB`, `LSD = 6.399–6.417 dB` on VCTK) than the narrow-band reference vocoders (`Codec 2`: `MCD = 8.383 / 9.994 dB`; `MELP`: `MCD = 8.091 / 9.629 dB`; `Speex`: `MCD = 8.055 / 9.004 dB`).
|
|
115
|
+
2. **Pitch Tracking (`F0 RMSE`)**: Conditioning the 16 kHz Parametric WaveNet decoder on the quantized 7-bit F0 contour yields lower voiced pitch error (`6.872 / 6.344 Hz` on LibriSpeech; `17.184 / 17.126 Hz` on VCTK) than narrow-band `Codec 2` (`13.002 / 21.042 Hz`), `MELP` (`17.825 / 21.724 Hz`), and `Speex` (`40.598 / 40.055 Hz`).
|
|
116
|
+
3. **Implicit 4–8 kHz Bandwidth Extension**: Whereas 8 kHz narrow-band codecs (`MELP`, `Codec 2`, `Speex`) contain negligible energy above 4 kHz (`0.007%–0.024%`), the 16 kHz Parametric WaveNet decoder reconstructs upper-band 4–8 kHz energy (`1.111%` for `W_w` and `0.880%` for `W_wo` on LibriSpeech; `0.545%` and `0.557%` on VCTK) purely from the 50-bit/20ms bitstream via the internal WaveNet wideband filterbank layers (`layers 1..3`).
|
|
117
|
+
4. **ITU-T P.862.2 Wideband PESQ (`MOS-LQO`)**: Because ITU-T P.862.2 `PESQ-WB` penalizes phase-asynchronous generative vocoders without high-band waveform locking, all 2.15–2.4 kb/s parametric vocoders score in the `1.32–1.71` `PESQ-WB` range (compared to `2.3–2.7` under perceptual time-warped POLQA in Table 1 of Kleijn et al.), while `AMR-WB (23.05 kb/s)` achieves `4.006 / 3.809` and lossless `WaveNet Waveform (WW)` achieves `4.141 / 3.721`.
|
|
118
118
|
|
|
119
119
|
#### Paper Table 1 (WSJ0 POLQA MOS-LQO, Sec. 3.3)
|
|
120
120
|
|
|
@@ -132,31 +132,31 @@ Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s
|
|
|
132
132
|
|
|
133
133
|
| System / Codec | Bitrate (kb/s) | ITU-T P.862.2 PESQ-WB ↑ | STOI (0–1) ↑ | F0 RMSE (Hz) ↓ | MCD (dB) ↓ | LSD (dB) ↓ | SegSNR (dB) ↑ | High-Band (4–8 kHz) Energy (%) |
|
|
134
134
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
135
|
-
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 |
|
|
136
|
-
| **8-bit μ-law (128 kb/s)** | 128.00 | **4.
|
|
137
|
-
| **WaveNet Waveform (`WW`)** |
|
|
138
|
-
| **Hybrid Mode-Switching (`WW + W_w`)** |
|
|
139
|
-
| **AMR-WB (23.05 kb/s)** | 23.05 | **
|
|
140
|
-
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.
|
|
141
|
-
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.
|
|
142
|
-
| **MELP (2.4 kb/s)** | 2.40 | 1.
|
|
143
|
-
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.
|
|
144
|
-
| **Speex (2.15 kb/s)** | 2.15 | 1.
|
|
135
|
+
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 5.378% |
|
|
136
|
+
| **8-bit μ-law (128 kb/s)** | 128.00 | **4.141** | **0.999** | 0.103 | 0.470 | 0.870 | 35.144 | 5.388% |
|
|
137
|
+
| **WaveNet Waveform (`WW`)** | 86.54 (81.99 active) | **4.141** | **0.999** | 0.103 | 0.470 | 0.870 | 35.144 | 5.388% |
|
|
138
|
+
| **Hybrid Mode-Switching (`WW + W_w`)** | 3.30 | 1.473 | **0.819** | 6.872 | **5.404** | **6.043** | -2.286 | **1.207%** |
|
|
139
|
+
| **AMR-WB (23.05 kb/s)** | 23.05 | **4.006** | **0.988** | 7.494 | 1.523 | 3.218 | 5.711 | 2.492% |
|
|
140
|
+
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.470 | **0.818** | 6.872 | **5.452** | **6.100** | -2.466 | **1.111%** |
|
|
141
|
+
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.484 | **0.818** | **6.344** | **5.644** | **6.204** | -2.446 | **0.880%** |
|
|
142
|
+
| **MELP (2.4 kb/s)** | 2.40 | 1.708 | 0.807 | 17.825 | 8.091 | 7.989 | -2.759 | 0.021% |
|
|
143
|
+
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.548 | 0.793 | 13.002 | 8.383 | 8.212 | -2.187 | 0.018% |
|
|
144
|
+
| **Speex (2.15 kb/s)** | 2.15 | 1.477 | 0.788 | 40.598 | 8.055 | 7.971 | -1.242 | 0.024% |
|
|
145
145
|
|
|
146
146
|
#### VCTK Corpus Evaluation (`pretrained_models/evaluation_vctk.json`)
|
|
147
147
|
|
|
148
148
|
| System / Codec | Bitrate (kb/s) | ITU-T P.862.2 PESQ-WB ↑ | STOI (0–1) ↑ | F0 RMSE (Hz) ↓ | MCD (dB) ↓ | LSD (dB) ↓ | SegSNR (dB) ↑ | High-Band (4–8 kHz) Energy (%) |
|
|
149
149
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
150
|
-
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 1.
|
|
151
|
-
| **8-bit μ-law (128 kb/s)** | 128.00 | **3.
|
|
152
|
-
| **WaveNet Waveform (`WW`)** |
|
|
153
|
-
| **Hybrid Mode-Switching (`WW + W_w`)** |
|
|
154
|
-
| **AMR-WB (23.05 kb/s)** | 23.05 | **3.
|
|
155
|
-
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.
|
|
156
|
-
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.
|
|
157
|
-
| **MELP (2.4 kb/s)** | 2.40 | 1.
|
|
158
|
-
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.
|
|
159
|
-
| **Speex (2.15 kb/s)** | 2.15 | 1.
|
|
150
|
+
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 1.604% |
|
|
151
|
+
| **8-bit μ-law (128 kb/s)** | 128.00 | **3.721** | **0.999** | 0.121 | 0.552 | 0.860 | 34.748 | 1.613% |
|
|
152
|
+
| **WaveNet Waveform (`WW`)** | 79.61 (77.17 active) | **3.721** | **0.999** | 0.121 | 0.552 | 0.860 | 34.748 | 1.613% |
|
|
153
|
+
| **Hybrid Mode-Switching (`WW + W_w`)** | 2.84 | 1.318 | **0.856** | 17.184 | **5.762** | **6.404** | -2.189 | **0.551%** |
|
|
154
|
+
| **AMR-WB (23.05 kb/s)** | 23.05 | **3.809** | **0.990** | 9.317 | 1.719 | 3.435 | 5.398 | 1.002% |
|
|
155
|
+
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.318 | **0.856** | 17.184 | **5.774** | **6.417** | -2.279 | **0.545%** |
|
|
156
|
+
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.335 | **0.856** | **17.126** | **5.821** | **6.399** | -2.269 | **0.557%** |
|
|
157
|
+
| **MELP (2.4 kb/s)** | 2.40 | 1.460 | 0.799 | 21.724 | 9.629 | 8.989 | -2.779 | 0.011% |
|
|
158
|
+
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.378 | 0.808 | 21.042 | 9.994 | 9.061 | -2.083 | 0.007% |
|
|
159
|
+
| **Speex (2.15 kb/s)** | 2.15 | 1.489 | 0.825 | 40.055 | 9.004 | 8.727 | -1.193 | 0.015% |
|
|
160
160
|
|
|
161
161
|
<p align="center">
|
|
162
162
|
<img src="resources/mushra.png" alt="Paper Figure 3: MUSHRA Perceptual Evaluation" width="44%"/>
|
|
@@ -165,14 +165,13 @@ Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s
|
|
|
165
165
|
|
|
166
166
|
### 3. Speaker Identification & Triangle Test (Section 3.4)
|
|
167
167
|
|
|
168
|
-
Section 3.4 evaluates speaker identity preservation using two 3-layer Projected-LSTM (`LSTMP`) speaker verification networks trained with `GE2E` loss on 8-bit μ-law speech (`wavenet_speaker_verifier_mulaw`, reaching **
|
|
168
|
+
Section 3.4 evaluates speaker identity preservation using two 3-layer Projected-LSTM (`LSTMP`) speaker verification networks trained with `GE2E` loss on 8-bit μ-law speech (`wavenet_speaker_verifier_mulaw`, reaching **2.68% EER** on the held-out evaluation set) and 2.4 kb/s coded speech (`wavenet_speaker_verifier_coded`, reaching **12.50% EER** on the held-out evaluation set), plus a discrete 3-AFC odd-one-out triangle test (`Original`, `W_w`, `W_wo`) measuring how often `W_wo` is selected as the odd speaker out relative to the `33.33%` random-chance baseline:
|
|
169
169
|
|
|
170
170
|
| Benchmark / Dataset | 8-bit μ-law EER (%) [95% CI] | Parametric WaveNet `W_wo` EER (%) (`V_coded`) [95% CI] | Parametric WaveNet `W_wo` EER (%) (`V_mulaw`) [95% CI] | Parametric WaveNet `W_w` EER (%) (`V_mulaw`) [95% CI] | Mean Cosine Similarity `cos(Orig, W_w)` vs `cos(Orig, W_wo)` | 3-AFC Triangle Odd-One-Out Rate (`W_wo` selected vs `33.33%` chance) |
|
|
171
171
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
172
172
|
| **Paper Reported (WSJ0, Sec. 3.4)** | 8.4% | 15.8% | — | — | — | **41.0%** (chance: 33.3%) |
|
|
173
|
-
| **Reproduced —
|
|
174
|
-
| **Reproduced —
|
|
175
|
-
| **Reproduced — VCTK Corpus (8 spk, 16 utt)** | **12.50%** [3.57%, 37.51%] | **15.18%** [3.57%, 37.95%] | **24.55%** [11.15%, 37.95%] | **21.88%** [8.92%, 37.95%] | **0.6146** vs **0.6013** (`Δ = +0.0133`, ABX `56.25%`) | **43.75%** (chance: 33.33%) |
|
|
173
|
+
| **Reproduced — LibriSpeech (`test-clean`, 8 spk, 16 utt)** | **2.68%** [0.89%, 11.16%] | **12.50%** [1.77%, 21.44%] | **12.50%** [3.57%, 36.63%] | **12.50%** [3.57%, 34.38%] | **0.6787** vs **0.6469** (`Δ = +0.0318`, ABX `75.00%`) | **75.00%** (chance: 33.33%) |
|
|
174
|
+
| **Reproduced — VCTK Corpus (8 spk, 16 utt)** | **12.95%** [4.02%, 37.51%] | **23.66%** [11.60%, 37.95%] | **23.66%** [12.50%, 37.06%] | **23.66%** [9.82%, 37.50%] | **0.5678** vs **0.5584** (`Δ = +0.0094`, ABX `75.00%`) | **75.00%** (chance: 33.33%) |
|
|
176
175
|
|
|
177
176
|
---
|
|
178
177
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
**This is not an officially supported Google product.**
|
|
9
9
|
|
|
10
|
-
> **Open-Source Paper Reproduction Notice**: This repository is a clean-room, open-source reproduction of the paper **W. Bastiaan Kleijn, Felicia S. C. Lim, Alejandro Luebs, Jan Skoglund, Florian Stimberg, Quan Wang, and Thomas C. Walters, *"WaveNet Based Low Rate Speech Coding,"* IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 676–680, 2018 ([arXiv:1712.01120](https://arxiv.org/abs/1712.01120))**, created after the original publication using open-source frameworks (`TensorFlow 2`, `NumPy`, `SciPy`, `SafeTensors`, `TFLite`, `GGUF`), open-source C reference codec libraries (`
|
|
10
|
+
> **Open-Source Paper Reproduction Notice**: This repository is a clean-room, open-source reproduction of the paper **W. Bastiaan Kleijn, Felicia S. C. Lim, Alejandro Luebs, Jan Skoglund, Florian Stimberg, Quan Wang, and Thomas C. Walters, *"WaveNet Based Low Rate Speech Coding,"* IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 676–680, 2018 ([arXiv:1712.01120](https://arxiv.org/abs/1712.01120))**, created after the original publication using open-source frameworks (`TensorFlow 2`, `NumPy`, `SciPy`, `SafeTensors`, `TFLite`, `GGUF`), open-source C reference codec libraries (`libspeex`, `libvo-amrwbenc`, `libopencore-amrwb`) plus a pure-Python 50-bit/20ms `Codec 2` 2400 bps implementation, ITU-T P.862.2 wideband `PESQ` and `STOI`, and public multi-speaker speech datasets (**LibriSpeech** and **CSTR VCTK**).
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -18,9 +18,9 @@ Traditional speech coders fall into two families:
|
|
|
18
18
|
2. **Parametric coders** (Sections 2.2 & 2.4): Extract compact vocal-tract, pitch, and energy parameters every 10–20 ms (e.g., **Codec 2** at **2.4 kb/s**) and synthesize a perceptually plausible waveform at the receiver.
|
|
19
19
|
|
|
20
20
|
This package implements all four core components introduced in **Kleijn et al. (ICASSP 2018)**:
|
|
21
|
-
- **Closed-Loop WaveNet Waveform Coding (`WW`, Section 2.3)**: Uses a causal dilated WaveNet (`q^(i)(x_i | x_0, ..., x_{i-1})`) inside a closed quantization loop over 256-level 8-bit μ-law samples (`n_i = Q(x_i)`), paired with a bit-exact 32-bit integer arithmetic coder to losslessly compress 16 kHz 8-bit μ-law speech from **128.00 kb/s** down to **
|
|
22
|
-
- **Codec 2 Conditioned Parametric WaveNet Coding (`WP` / `W_wo` / `W_w`, Section 2.4)**: Encodes 16 kHz speech into a serialized **2.4 kb/s** bitstream (**50 bits per 20 ms block**: 36 bits LSP spectral envelope, 7 bits fundamental frequency F0, 5 bits energy, and 2 voicing flags; `36 + 7 + 5 + 2 = 50 bits / 20 ms`), unpacks the bitstream at the receiver with zero reference access, and synthesizes 16 kHz wideband speech with implicit 4–8 kHz bandwidth extension.
|
|
23
|
-
- **Likelihood-Guided Mode Switching (`HybridModeSwitchingCodec`, Section 2.4)**: Dynamically switches between 2.4 kb/s parametric coding and closed-loop arithmetic waveform coding on 20 ms frames where the parametric negative log-likelihood exceeds a threshold (`
|
|
21
|
+
- **Closed-Loop WaveNet Waveform Coding (`WW`, Section 2.3)**: Uses a causal dilated WaveNet (`q^(i)(x_i | x_0, ..., x_{i-1})`) inside a closed quantization loop over 256-level 8-bit μ-law samples (`n_i = Q(x_i)`), paired with a bit-exact 32-bit integer arithmetic coder to losslessly compress 16 kHz 8-bit μ-law speech from **128.00 kb/s** down to **81.99 kb/s** (`5.1243 bits/sample` active arithmetic coded bitrate on LibriSpeech `test-clean`) and **77.17 kb/s** (`4.8234 bits/sample` on VCTK), with a theoretical conditional entropy lower bound `H̄` of **78.77 kb/s** (`4.9232 bits/sample`) on LibriSpeech and **77.81 kb/s** (`4.8631 bits/sample`) on VCTK.
|
|
22
|
+
- **Codec 2 Conditioned Parametric WaveNet Coding (`WP` / `W_wo` / `W_w`, Section 2.4)**: Encodes 16 kHz speech into a serialized **2.4 kb/s** bitstream (**43-bit** unquantized stream header + **50 bits per 20 ms block**: 36 bits LSP spectral envelope, 7 bits fundamental frequency F0, 5 bits energy, and 2 voicing flags; `36 + 7 + 5 + 2 = 50 bits / 20 ms`), unpacks the bitstream at the receiver with zero reference access, and synthesizes 16 kHz wideband speech with implicit 4–8 kHz bandwidth extension (`1.111%` high-band energy for `W_w` and `0.880%` for `W_wo` on LibriSpeech).
|
|
23
|
+
- **Likelihood-Guided Mode Switching (`HybridModeSwitchingCodec`, Section 2.4)**: Dynamically switches between 2.4 kb/s parametric coding and closed-loop arithmetic waveform coding on 20 ms frames where the teacher-forced parametric negative log-likelihood exceeds a threshold (`3.304 kb/s` on LibriSpeech and `2.842 kb/s` on VCTK).
|
|
24
24
|
- **GE2E Speaker Verification & Triangle Discriminability (`build_speaker_verifier`, Section 3.4)**: Implements the 3-layer Projected-LSTM (`LSTMP`) speaker embedding network (128 LSTM units projected to 64 dimensions per layer over 40-channel frame-level log-Mel filterbank features) trained with Generalized End-to-End (`GE2E`) softmax loss to evaluate speaker identity preservation across 8-bit μ-law speech, speaker-disjoint Parametric WaveNet (`W_wo`), and speaker-overlapping Parametric WaveNet (`W_w`).
|
|
25
25
|
|
|
26
26
|
<p align="center">
|
|
@@ -35,11 +35,11 @@ All five pretrained models are trained on real multi-speaker LibriSpeech + VCTK
|
|
|
35
35
|
|
|
36
36
|
| Model Name | Hugging Face Repository | Task / Paper Section | Initial Eval Metric | Final Eval Metric | Exported Formats |
|
|
37
37
|
| :--- | :--- | :--- | :---: | :---: | :--- |
|
|
38
|
-
| **`wavenet_waveform_coder` (`WW`)** | [`wq2012/wavenet-waveform-coder`](https://huggingface.co/wq2012/wavenet-waveform-coder) | Closed-Loop Waveform Coder (Sec. 2.3 & 3.2) | 7.0186 bits/sample (4.8649 nats) | **4.
|
|
39
|
-
| **`wavenet_parametric_2400_speaker_independent` (`W_wo`)** | [`wq2012/wavenet-parametric-2400-speaker-independent`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-independent) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Disjoint (Sec. 2.4 & 3.3) | 7.0185 bits/sample (4.8648 nats) | **4.
|
|
40
|
-
| **`wavenet_parametric_2400_speaker_overlapping` (`W_w`)** | [`wq2012/wavenet-parametric-2400-speaker-overlapping`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-overlapping) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Overlapping (Sec. 3.3 & 3.4) | 7.0186 bits/sample (4.
|
|
41
|
-
| **`wavenet_speaker_verifier_mulaw`** | [`wq2012/wavenet-speaker-verifier-mulaw`](https://huggingface.co/wq2012/wavenet-speaker-verifier-mulaw) | 3-Layer LSTMP GE2E Speaker Verifier on 8-bit μ-law Speech (Sec. 3.4) |
|
|
42
|
-
| **`wavenet_speaker_verifier_coded`** | [`wq2012/wavenet-speaker-verifier-coded`](https://huggingface.co/wq2012/wavenet-speaker-verifier-coded) | 3-Layer LSTMP GE2E Speaker Verifier on 2.4 kb/s Coded Speech (Sec. 3.4) |
|
|
38
|
+
| **`wavenet_waveform_coder` (`WW`)** | [`wq2012/wavenet-waveform-coder`](https://huggingface.co/wq2012/wavenet-waveform-coder) | Closed-Loop Waveform Coder (Sec. 2.3 & 3.2) | 7.0186 bits/sample (4.8649 nats) | **4.2561 bits/sample** (2.9501 nats) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
39
|
+
| **`wavenet_parametric_2400_speaker_independent` (`W_wo`)** | [`wq2012/wavenet-parametric-2400-speaker-independent`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-independent) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Disjoint (Sec. 2.4 & 3.3) | 7.0185 bits/sample (4.8648 nats) | **4.3116 bits/sample** (2.9886 nats) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
40
|
+
| **`wavenet_parametric_2400_speaker_overlapping` (`W_w`)** | [`wq2012/wavenet-parametric-2400-speaker-overlapping`](https://huggingface.co/wq2012/wavenet-parametric-2400-speaker-overlapping) | 2.4 kb/s Codec 2 Parametric WaveNet — Speaker-Overlapping (Sec. 3.3 & 3.4) | 7.0186 bits/sample (4.8650 nats) | **4.3116 bits/sample** (2.9886 nats, train: 4.1180) | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
41
|
+
| **`wavenet_speaker_verifier_mulaw`** | [`wq2012/wavenet-speaker-verifier-mulaw`](https://huggingface.co/wq2012/wavenet-speaker-verifier-mulaw) | 3-Layer LSTMP GE2E Speaker Verifier on 8-bit μ-law Speech (Sec. 3.4) | 0.9159 GE2E loss (12.50% eval EER) | **0.1715 GE2E loss (2.68% eval EER)** | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
42
|
+
| **`wavenet_speaker_verifier_coded`** | [`wq2012/wavenet-speaker-verifier-coded`](https://huggingface.co/wq2012/wavenet-speaker-verifier-coded) | 3-Layer LSTMP GE2E Speaker Verifier on 2.4 kb/s Coded Speech (Sec. 3.4) | 1.2813 GE2E loss (15.62% eval EER) | **0.5116 GE2E loss (12.50% eval EER)** | `.safetensors`, `saved_model/`, `.tflite` (FP32/INT8), `.gguf` (FP16/Q4_K_M) |
|
|
43
43
|
|
|
44
44
|
- **Interactive Demo Space**: [**`wq2012/wavenet-coding-demo`**](https://huggingface.co/spaces/wq2012/wavenet-coding-demo)
|
|
45
45
|
|
|
@@ -58,10 +58,10 @@ In Section 3.2 of the paper, the average conditional entropy `H̄` (Eq. 4, theor
|
|
|
58
58
|
| Dataset / Split | Mean Conditional Entropy H̄ (bits/sample) | Theoretical Lower-Bound Bitrate (kb/s) | Cross-Entropy Rate R (bits/sample) | Cross-Entropy Bitrate (kb/s) | Active Arithmetic Coded Rate (bits/sample) | Active Arithmetic Bitrate (kb/s) | Arithmetic Coder Lossless Match Rate |
|
|
59
59
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
60
60
|
| **Paper Reported (WSJ0, Sec. 3.2, 60-layer conditioned WW)** | 2.6113 (1.81 nats) | 41.78 | 2.6546 (1.84 nats) | 42.47 (~42 kb/s) | — | — | — |
|
|
61
|
-
| **Reproduced — LibriSpeech (`test-clean`, 20-layer unconditioned WW)** | **4.
|
|
62
|
-
| **Reproduced — VCTK Corpus (20-layer unconditioned WW)** | **4.
|
|
61
|
+
| **Reproduced — LibriSpeech (`test-clean`, 20-layer unconditioned WW)** | **4.9232** | **78.77** | **5.4089** (3.7491 nats) | **86.54** | **5.1243** | **81.99** | **100.0% (16/16)** |
|
|
62
|
+
| **Reproduced — VCTK Corpus (20-layer unconditioned WW)** | **4.8631** | **77.81** | **4.9755** (3.4488 nats) | **79.61** | **4.8234** | **77.17** | **100.0% (16/16)** |
|
|
63
63
|
|
|
64
|
-
> **Architectural Scaling Note**: The original ICASSP 2018 paper trained a 60-layer conditioned WaveNet (`3` blocks × `10` layers + conditioning stack) on `32,580` WSJ0 utterances to reach `2.65 bits/sample` (`42 kb/s`). Our lightweight CPU-reproducible `20`-layer unconditioned closed-loop WaveNet (`2` blocks × `10` layers) reduces the 16 kHz 8-bit μ-law bitrate from **128.00 kb/s** to **
|
|
64
|
+
> **Architectural Scaling Note**: The original ICASSP 2018 paper trained a 60-layer conditioned WaveNet (`3` blocks × `10` layers + conditioning stack) on `32,580` WSJ0 utterances to reach `2.65 bits/sample` (`42 kb/s`). Our lightweight CPU-reproducible `20`-layer unconditioned closed-loop WaveNet (`2` blocks × `10` layers) reduces the 16 kHz 8-bit μ-law bitrate from **128.00 kb/s** to **77.17–81.99 kb/s** (`35.9%–39.7%` lossless compression savings) with **100% bit-exact reconstruction** across all 16 held-out utterances per corpus.
|
|
65
65
|
|
|
66
66
|
#### Paper Figure 2 vs. Reproduced Instantaneous Entropy Profile
|
|
67
67
|
|
|
@@ -74,13 +74,13 @@ As observed in Section 3.2 of the paper, the instantaneous entropy `H_i` is lowe
|
|
|
74
74
|
|
|
75
75
|
### 2. Parametric 2.4 kb/s & Reference Codec Comparison (Section 3.3)
|
|
76
76
|
|
|
77
|
-
Section 3.3 compares the 16 kHz Reference, Closed-Loop WaveNet Waveform Coder (`WW`), Likelihood-Guided Hybrid Mode-Switching (`WW + W_w`), **AMR-WB (`23.05 kb/s` via `libvo-amrwbenc` + `libopencore-amrwb`)**, **Parametric WaveNet with speaker overlap (`W_w, 2.4 kb/s`)**, **Parametric WaveNet without speaker overlap (`W_wo, 2.4 kb/s`)**, **MELP (`2.4 kb/s`)**, **Codec 2 (`2.4 kb/s`
|
|
77
|
+
Section 3.3 compares the 16 kHz Reference, Closed-Loop WaveNet Waveform Coder (`WW`), Likelihood-Guided Hybrid Mode-Switching (`WW + W_w`), **AMR-WB (`23.05 kb/s` via `libvo-amrwbenc` + `libopencore-amrwb`)**, **Parametric WaveNet with speaker overlap (`W_w, 2.4 kb/s`)**, **Parametric WaveNet without speaker overlap (`W_wo, 2.4 kb/s`)**, **MELP (`2.4 kb/s`)**, **Codec 2 (`2.4 kb/s`)**, and **Speex (`2.15 kb/s` via `libspeex`)**.
|
|
78
78
|
|
|
79
79
|
Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s`) implementation:
|
|
80
|
-
1. **Short-Time Objective Intelligibility (`STOI`) & Spectral Distortion (`MCD` / `LSD`)**: At **2.4 kb/s**, both Parametric WaveNet models (`W_w` and `W_wo`) achieve higher intelligibility (`STOI = 0.
|
|
81
|
-
2. **Pitch Tracking (`F0 RMSE`)**: Conditioning the 16 kHz Parametric WaveNet decoder on the quantized 7-bit F0 contour yields lower voiced pitch error (`
|
|
82
|
-
3. **Implicit 4–8 kHz Bandwidth Extension**: Whereas 8 kHz narrow-band codecs (`MELP`, `Codec 2`, `Speex`) contain negligible energy above 4 kHz (`0.
|
|
83
|
-
4. **ITU-T P.862.2 Wideband PESQ (`MOS-LQO`)**: Because ITU-T P.862.2 `PESQ-WB` penalizes phase-asynchronous generative vocoders without high-band waveform locking, all 2.15–2.4 kb/s parametric vocoders score in the `1.
|
|
80
|
+
1. **Short-Time Objective Intelligibility (`STOI`) & Spectral Distortion (`MCD` / `LSD`)**: At **2.4 kb/s**, both Parametric WaveNet models (`W_w` and `W_wo`) achieve higher intelligibility (`STOI = 0.818` on LibriSpeech; `0.856` on VCTK) and significantly lower spectral envelope distortion (`MCD = 5.452–5.644 dB`, `LSD = 6.100–6.204 dB` on LibriSpeech; `MCD = 5.774–5.821 dB`, `LSD = 6.399–6.417 dB` on VCTK) than the narrow-band reference vocoders (`Codec 2`: `MCD = 8.383 / 9.994 dB`; `MELP`: `MCD = 8.091 / 9.629 dB`; `Speex`: `MCD = 8.055 / 9.004 dB`).
|
|
81
|
+
2. **Pitch Tracking (`F0 RMSE`)**: Conditioning the 16 kHz Parametric WaveNet decoder on the quantized 7-bit F0 contour yields lower voiced pitch error (`6.872 / 6.344 Hz` on LibriSpeech; `17.184 / 17.126 Hz` on VCTK) than narrow-band `Codec 2` (`13.002 / 21.042 Hz`), `MELP` (`17.825 / 21.724 Hz`), and `Speex` (`40.598 / 40.055 Hz`).
|
|
82
|
+
3. **Implicit 4–8 kHz Bandwidth Extension**: Whereas 8 kHz narrow-band codecs (`MELP`, `Codec 2`, `Speex`) contain negligible energy above 4 kHz (`0.007%–0.024%`), the 16 kHz Parametric WaveNet decoder reconstructs upper-band 4–8 kHz energy (`1.111%` for `W_w` and `0.880%` for `W_wo` on LibriSpeech; `0.545%` and `0.557%` on VCTK) purely from the 50-bit/20ms bitstream via the internal WaveNet wideband filterbank layers (`layers 1..3`).
|
|
83
|
+
4. **ITU-T P.862.2 Wideband PESQ (`MOS-LQO`)**: Because ITU-T P.862.2 `PESQ-WB` penalizes phase-asynchronous generative vocoders without high-band waveform locking, all 2.15–2.4 kb/s parametric vocoders score in the `1.32–1.71` `PESQ-WB` range (compared to `2.3–2.7` under perceptual time-warped POLQA in Table 1 of Kleijn et al.), while `AMR-WB (23.05 kb/s)` achieves `4.006 / 3.809` and lossless `WaveNet Waveform (WW)` achieves `4.141 / 3.721`.
|
|
84
84
|
|
|
85
85
|
#### Paper Table 1 (WSJ0 POLQA MOS-LQO, Sec. 3.3)
|
|
86
86
|
|
|
@@ -98,31 +98,31 @@ Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s
|
|
|
98
98
|
|
|
99
99
|
| System / Codec | Bitrate (kb/s) | ITU-T P.862.2 PESQ-WB ↑ | STOI (0–1) ↑ | F0 RMSE (Hz) ↓ | MCD (dB) ↓ | LSD (dB) ↓ | SegSNR (dB) ↑ | High-Band (4–8 kHz) Energy (%) |
|
|
100
100
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
101
|
-
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 |
|
|
102
|
-
| **8-bit μ-law (128 kb/s)** | 128.00 | **4.
|
|
103
|
-
| **WaveNet Waveform (`WW`)** |
|
|
104
|
-
| **Hybrid Mode-Switching (`WW + W_w`)** |
|
|
105
|
-
| **AMR-WB (23.05 kb/s)** | 23.05 | **
|
|
106
|
-
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.
|
|
107
|
-
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.
|
|
108
|
-
| **MELP (2.4 kb/s)** | 2.40 | 1.
|
|
109
|
-
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.
|
|
110
|
-
| **Speex (2.15 kb/s)** | 2.15 | 1.
|
|
101
|
+
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 5.378% |
|
|
102
|
+
| **8-bit μ-law (128 kb/s)** | 128.00 | **4.141** | **0.999** | 0.103 | 0.470 | 0.870 | 35.144 | 5.388% |
|
|
103
|
+
| **WaveNet Waveform (`WW`)** | 86.54 (81.99 active) | **4.141** | **0.999** | 0.103 | 0.470 | 0.870 | 35.144 | 5.388% |
|
|
104
|
+
| **Hybrid Mode-Switching (`WW + W_w`)** | 3.30 | 1.473 | **0.819** | 6.872 | **5.404** | **6.043** | -2.286 | **1.207%** |
|
|
105
|
+
| **AMR-WB (23.05 kb/s)** | 23.05 | **4.006** | **0.988** | 7.494 | 1.523 | 3.218 | 5.711 | 2.492% |
|
|
106
|
+
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.470 | **0.818** | 6.872 | **5.452** | **6.100** | -2.466 | **1.111%** |
|
|
107
|
+
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.484 | **0.818** | **6.344** | **5.644** | **6.204** | -2.446 | **0.880%** |
|
|
108
|
+
| **MELP (2.4 kb/s)** | 2.40 | 1.708 | 0.807 | 17.825 | 8.091 | 7.989 | -2.759 | 0.021% |
|
|
109
|
+
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.548 | 0.793 | 13.002 | 8.383 | 8.212 | -2.187 | 0.018% |
|
|
110
|
+
| **Speex (2.15 kb/s)** | 2.15 | 1.477 | 0.788 | 40.598 | 8.055 | 7.971 | -1.242 | 0.024% |
|
|
111
111
|
|
|
112
112
|
#### VCTK Corpus Evaluation (`pretrained_models/evaluation_vctk.json`)
|
|
113
113
|
|
|
114
114
|
| System / Codec | Bitrate (kb/s) | ITU-T P.862.2 PESQ-WB ↑ | STOI (0–1) ↑ | F0 RMSE (Hz) ↓ | MCD (dB) ↓ | LSD (dB) ↓ | SegSNR (dB) ↑ | High-Band (4–8 kHz) Energy (%) |
|
|
115
115
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
116
|
-
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 1.
|
|
117
|
-
| **8-bit μ-law (128 kb/s)** | 128.00 | **3.
|
|
118
|
-
| **WaveNet Waveform (`WW`)** |
|
|
119
|
-
| **Hybrid Mode-Switching (`WW + W_w`)** |
|
|
120
|
-
| **AMR-WB (23.05 kb/s)** | 23.05 | **3.
|
|
121
|
-
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.
|
|
122
|
-
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.
|
|
123
|
-
| **MELP (2.4 kb/s)** | 2.40 | 1.
|
|
124
|
-
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.
|
|
125
|
-
| **Speex (2.15 kb/s)** | 2.15 | 1.
|
|
116
|
+
| **Reference (16 kHz)** | 256.00 | **4.644** | **1.000** | 0.000 | 0.000 | 0.000 | 45.000 | 1.604% |
|
|
117
|
+
| **8-bit μ-law (128 kb/s)** | 128.00 | **3.721** | **0.999** | 0.121 | 0.552 | 0.860 | 34.748 | 1.613% |
|
|
118
|
+
| **WaveNet Waveform (`WW`)** | 79.61 (77.17 active) | **3.721** | **0.999** | 0.121 | 0.552 | 0.860 | 34.748 | 1.613% |
|
|
119
|
+
| **Hybrid Mode-Switching (`WW + W_w`)** | 2.84 | 1.318 | **0.856** | 17.184 | **5.762** | **6.404** | -2.189 | **0.551%** |
|
|
120
|
+
| **AMR-WB (23.05 kb/s)** | 23.05 | **3.809** | **0.990** | 9.317 | 1.719 | 3.435 | 5.398 | 1.002% |
|
|
121
|
+
| **WaveNet Parametric (`W_w`, 2.4 kb/s)** | 2.40 | 1.318 | **0.856** | 17.184 | **5.774** | **6.417** | -2.279 | **0.545%** |
|
|
122
|
+
| **WaveNet Parametric (`W_wo`, 2.4 kb/s)** | 2.40 | 1.335 | **0.856** | **17.126** | **5.821** | **6.399** | -2.269 | **0.557%** |
|
|
123
|
+
| **MELP (2.4 kb/s)** | 2.40 | 1.460 | 0.799 | 21.724 | 9.629 | 8.989 | -2.779 | 0.011% |
|
|
124
|
+
| **Codec 2 (2.4 kb/s)** | 2.40 | 1.378 | 0.808 | 21.042 | 9.994 | 9.061 | -2.083 | 0.007% |
|
|
125
|
+
| **Speex (2.15 kb/s)** | 2.15 | 1.489 | 0.825 | 40.055 | 9.004 | 8.727 | -1.193 | 0.015% |
|
|
126
126
|
|
|
127
127
|
<p align="center">
|
|
128
128
|
<img src="resources/mushra.png" alt="Paper Figure 3: MUSHRA Perceptual Evaluation" width="44%"/>
|
|
@@ -131,14 +131,13 @@ Key empirical observations on our strictly reference-free 50-bit/20ms (`2.4 kb/s
|
|
|
131
131
|
|
|
132
132
|
### 3. Speaker Identification & Triangle Test (Section 3.4)
|
|
133
133
|
|
|
134
|
-
Section 3.4 evaluates speaker identity preservation using two 3-layer Projected-LSTM (`LSTMP`) speaker verification networks trained with `GE2E` loss on 8-bit μ-law speech (`wavenet_speaker_verifier_mulaw`, reaching **
|
|
134
|
+
Section 3.4 evaluates speaker identity preservation using two 3-layer Projected-LSTM (`LSTMP`) speaker verification networks trained with `GE2E` loss on 8-bit μ-law speech (`wavenet_speaker_verifier_mulaw`, reaching **2.68% EER** on the held-out evaluation set) and 2.4 kb/s coded speech (`wavenet_speaker_verifier_coded`, reaching **12.50% EER** on the held-out evaluation set), plus a discrete 3-AFC odd-one-out triangle test (`Original`, `W_w`, `W_wo`) measuring how often `W_wo` is selected as the odd speaker out relative to the `33.33%` random-chance baseline:
|
|
135
135
|
|
|
136
136
|
| Benchmark / Dataset | 8-bit μ-law EER (%) [95% CI] | Parametric WaveNet `W_wo` EER (%) (`V_coded`) [95% CI] | Parametric WaveNet `W_wo` EER (%) (`V_mulaw`) [95% CI] | Parametric WaveNet `W_w` EER (%) (`V_mulaw`) [95% CI] | Mean Cosine Similarity `cos(Orig, W_w)` vs `cos(Orig, W_wo)` | 3-AFC Triangle Odd-One-Out Rate (`W_wo` selected vs `33.33%` chance) |
|
|
137
137
|
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
138
138
|
| **Paper Reported (WSJ0, Sec. 3.4)** | 8.4% | 15.8% | — | — | — | **41.0%** (chance: 33.3%) |
|
|
139
|
-
| **Reproduced —
|
|
140
|
-
| **Reproduced —
|
|
141
|
-
| **Reproduced — VCTK Corpus (8 spk, 16 utt)** | **12.50%** [3.57%, 37.51%] | **15.18%** [3.57%, 37.95%] | **24.55%** [11.15%, 37.95%] | **21.88%** [8.92%, 37.95%] | **0.6146** vs **0.6013** (`Δ = +0.0133`, ABX `56.25%`) | **43.75%** (chance: 33.33%) |
|
|
139
|
+
| **Reproduced — LibriSpeech (`test-clean`, 8 spk, 16 utt)** | **2.68%** [0.89%, 11.16%] | **12.50%** [1.77%, 21.44%] | **12.50%** [3.57%, 36.63%] | **12.50%** [3.57%, 34.38%] | **0.6787** vs **0.6469** (`Δ = +0.0318`, ABX `75.00%`) | **75.00%** (chance: 33.33%) |
|
|
140
|
+
| **Reproduced — VCTK Corpus (8 spk, 16 utt)** | **12.95%** [4.02%, 37.51%] | **23.66%** [11.60%, 37.95%] | **23.66%** [12.50%, 37.06%] | **23.66%** [9.82%, 37.50%] | **0.5678** vs **0.5584** (`Δ = +0.0094`, ABX `75.00%`) | **75.00%** (chance: 33.33%) |
|
|
142
141
|
|
|
143
142
|
---
|
|
144
143
|
|
|
@@ -213,13 +213,32 @@ def _save_codec_comparison_plot(
|
|
|
213
213
|
plt.close(fig)
|
|
214
214
|
|
|
215
215
|
|
|
216
|
+
def _round_robin_eval_pairs(
|
|
217
|
+
pairs: List[Any],
|
|
218
|
+
max_count: int,
|
|
219
|
+
) -> List[Any]:
|
|
220
|
+
"""Selects up to max_count pairs balanced across speakers."""
|
|
221
|
+
by_spk: Dict[str, List[str]] = {}
|
|
222
|
+
for spk, path in pairs:
|
|
223
|
+
by_spk.setdefault(str(spk), []).append(path)
|
|
224
|
+
ordered: List[Any] = []
|
|
225
|
+
max_len = max((len(v) for v in by_spk.values()), default=0)
|
|
226
|
+
for r in range(max_len):
|
|
227
|
+
for spk, paths in by_spk.items():
|
|
228
|
+
if r < len(paths):
|
|
229
|
+
ordered.append((spk, paths[r]))
|
|
230
|
+
return ordered[:max_count]
|
|
231
|
+
|
|
232
|
+
|
|
216
233
|
def main() -> None:
|
|
217
234
|
"""Main entry point for evaluation."""
|
|
218
235
|
args = parse_args()
|
|
219
236
|
with open(args.manifest, "r", encoding="utf-8") as f:
|
|
220
237
|
manifest = json.load(f)
|
|
221
238
|
|
|
222
|
-
eval_pairs =
|
|
239
|
+
eval_pairs = _round_robin_eval_pairs(
|
|
240
|
+
manifest["splits"]["eval_set"], args.max_eval_utterances
|
|
241
|
+
)
|
|
223
242
|
ww_codec = _load_or_default_waveform_codec(args.models_dir)
|
|
224
243
|
w_wo_codec = _load_or_default_parametric_codec(
|
|
225
244
|
args.models_dir,
|
|
@@ -267,6 +286,18 @@ def main() -> None:
|
|
|
267
286
|
# 1. Closed-loop WaveNet Waveform Coder (WW)
|
|
268
287
|
ww_out = ww_codec.encode_and_decode(wav, run_arithmetic_coder=True)
|
|
269
288
|
rm = ww_out["rate_metrics"]
|
|
289
|
+
if first_wav is None:
|
|
290
|
+
first_wav = wav
|
|
291
|
+
first_entropy = ww_out["instantaneous_entropy_bits"]
|
|
292
|
+
|
|
293
|
+
# 2. Parametric WaveNet Coders (W_wo and W_w) + Hybrid Mode-Switching
|
|
294
|
+
w_wo_out = w_wo_codec.encode_and_decode(wav, seed=42 + idx)
|
|
295
|
+
w_w_out = w_w_codec.encode_and_decode(wav, seed=42 + idx)
|
|
296
|
+
hybrid_out = hybrid_codec.encode_and_decode(
|
|
297
|
+
wav, seed=42 + idx, ww_out=ww_out, wp_out=w_w_out
|
|
298
|
+
)
|
|
299
|
+
rm_wo = w_wo_out["conditional_rate_metrics"]
|
|
300
|
+
rm_w = w_w_out["conditional_rate_metrics"]
|
|
270
301
|
rate_records.append(
|
|
271
302
|
{
|
|
272
303
|
"mean_entropy_bits_per_sample": rm["mean_entropy_bits_per_sample"],
|
|
@@ -278,6 +309,14 @@ def main() -> None:
|
|
|
278
309
|
rm["cross_entropy_bits_per_sample"] * np.log(2.0)
|
|
279
310
|
),
|
|
280
311
|
"cross_entropy_rate_kbps": rm["cross_entropy_rate_kbps"],
|
|
312
|
+
"w_wo_cross_entropy_bits_per_sample": rm_wo[
|
|
313
|
+
"cross_entropy_bits_per_sample"
|
|
314
|
+
],
|
|
315
|
+
"w_wo_cross_entropy_rate_kbps": rm_wo["cross_entropy_rate_kbps"],
|
|
316
|
+
"w_w_cross_entropy_bits_per_sample": rm_w[
|
|
317
|
+
"cross_entropy_bits_per_sample"
|
|
318
|
+
],
|
|
319
|
+
"w_w_cross_entropy_rate_kbps": rm_w["cross_entropy_rate_kbps"],
|
|
281
320
|
"arithmetic_coded_bits_per_sample": float(
|
|
282
321
|
ww_out["arithmetic_kbps_active"] / 16.0
|
|
283
322
|
),
|
|
@@ -290,16 +329,6 @@ def main() -> None:
|
|
|
290
329
|
),
|
|
291
330
|
}
|
|
292
331
|
)
|
|
293
|
-
if first_wav is None:
|
|
294
|
-
first_wav = wav
|
|
295
|
-
first_entropy = ww_out["instantaneous_entropy_bits"]
|
|
296
|
-
|
|
297
|
-
# 2. Parametric WaveNet Coders (W_wo and W_w) + Hybrid Mode-Switching
|
|
298
|
-
w_wo_out = w_wo_codec.encode_and_decode(wav, seed=42 + idx)
|
|
299
|
-
w_w_out = w_w_codec.encode_and_decode(wav, seed=42 + idx)
|
|
300
|
-
hybrid_out = hybrid_codec.encode_and_decode(
|
|
301
|
-
wav, seed=42 + idx, ww_out=ww_out, wp_out=w_w_out
|
|
302
|
-
)
|
|
303
332
|
|
|
304
333
|
# 3. Reference Baseline Codecs
|
|
305
334
|
frames, _ = c2_coder.encode_to_conditioning(wav)
|
|
@@ -362,28 +391,28 @@ def main() -> None:
|
|
|
362
391
|
}
|
|
363
392
|
)
|
|
364
393
|
|
|
365
|
-
# 4. Speaker verification features (Section 3.4)
|
|
394
|
+
# 4. Speaker verification features (Section 3.4, 120 frames)
|
|
366
395
|
mulaw_feats.append(
|
|
367
|
-
dataset.extract_log_mel_features(mulaw_wav, max_frames=
|
|
396
|
+
dataset.extract_log_mel_features(mulaw_wav, max_frames=120)
|
|
368
397
|
)
|
|
369
398
|
w_wo_feats.append(
|
|
370
399
|
dataset.extract_log_mel_features(
|
|
371
|
-
w_wo_out["reconstructed_waveform"], max_frames=
|
|
400
|
+
w_wo_out["reconstructed_waveform"], max_frames=120
|
|
372
401
|
)
|
|
373
402
|
)
|
|
374
403
|
w_w_feats.append(
|
|
375
404
|
dataset.extract_log_mel_features(
|
|
376
|
-
w_w_out["reconstructed_waveform"], max_frames=
|
|
405
|
+
w_w_out["reconstructed_waveform"], max_frames=120
|
|
377
406
|
)
|
|
378
407
|
)
|
|
379
|
-
c2_feats.append(dataset.extract_log_mel_features(c2_wav, max_frames=
|
|
408
|
+
c2_feats.append(dataset.extract_log_mel_features(c2_wav, max_frames=120))
|
|
380
409
|
melp_feats.append(
|
|
381
|
-
dataset.extract_log_mel_features(melp_wav, max_frames=
|
|
410
|
+
dataset.extract_log_mel_features(melp_wav, max_frames=120)
|
|
382
411
|
)
|
|
383
412
|
speex_feats.append(
|
|
384
|
-
dataset.extract_log_mel_features(speex_wav, max_frames=
|
|
413
|
+
dataset.extract_log_mel_features(speex_wav, max_frames=120)
|
|
385
414
|
)
|
|
386
|
-
amr_feats.append(dataset.extract_log_mel_features(amr_wav, max_frames=
|
|
415
|
+
amr_feats.append(dataset.extract_log_mel_features(amr_wav, max_frames=120))
|
|
387
416
|
speaker_ids.append(spk_id)
|
|
388
417
|
|
|
389
418
|
# Aggregate waveform coding rates
|
|
@@ -422,6 +451,40 @@ def main() -> None:
|
|
|
422
451
|
float(np.mean([r["cross_entropy_rate_kbps"] for r in rate_records])),
|
|
423
452
|
2,
|
|
424
453
|
),
|
|
454
|
+
"wavenet_parametric_w_wo_cross_entropy_bits_per_sample": round(
|
|
455
|
+
float(
|
|
456
|
+
np.mean(
|
|
457
|
+
[
|
|
458
|
+
r["w_wo_cross_entropy_bits_per_sample"]
|
|
459
|
+
for r in rate_records
|
|
460
|
+
]
|
|
461
|
+
)
|
|
462
|
+
),
|
|
463
|
+
4,
|
|
464
|
+
),
|
|
465
|
+
"wavenet_parametric_w_wo_cross_entropy_rate_kbps": round(
|
|
466
|
+
float(
|
|
467
|
+
np.mean([r["w_wo_cross_entropy_rate_kbps"] for r in rate_records])
|
|
468
|
+
),
|
|
469
|
+
2,
|
|
470
|
+
),
|
|
471
|
+
"wavenet_parametric_w_w_cross_entropy_bits_per_sample": round(
|
|
472
|
+
float(
|
|
473
|
+
np.mean(
|
|
474
|
+
[
|
|
475
|
+
r["w_w_cross_entropy_bits_per_sample"]
|
|
476
|
+
for r in rate_records
|
|
477
|
+
]
|
|
478
|
+
)
|
|
479
|
+
),
|
|
480
|
+
4,
|
|
481
|
+
),
|
|
482
|
+
"wavenet_parametric_w_w_cross_entropy_rate_kbps": round(
|
|
483
|
+
float(
|
|
484
|
+
np.mean([r["w_w_cross_entropy_rate_kbps"] for r in rate_records])
|
|
485
|
+
),
|
|
486
|
+
2,
|
|
487
|
+
),
|
|
425
488
|
"arithmetic_coded_bits_per_sample": round(
|
|
426
489
|
float(
|
|
427
490
|
np.mean(
|