Release v2.0: SVD task-conditioned centroids, PSI calibrator, and Virtual-EGG projection matrix
#2
by Khubaib01 - opened
- README.md +101 -122
- psi_calibrator_v2.npz +3 -0
- task_conditioned_centroids_v2.npz +3 -0
- virtual_egg_head_v2.npz +3 -0
README.md
CHANGED
|
@@ -14,165 +14,144 @@ tags:
|
|
| 14 |
- auralis-vfs
|
| 15 |
- audio-processing
|
| 16 |
- voice-analysis
|
|
|
|
|
|
|
|
|
|
| 17 |
- research
|
| 18 |
---
|
| 19 |
|
| 20 |
-
# ECAPA-TDNN-VHE: Vocal Health Encoder
|
| 21 |
|
| 22 |
## Model Details
|
| 23 |
|
| 24 |
-
- **Model name:** ECAPA-TDNN-VHE
|
| 25 |
-
- **Author:** Muhammad Khubaib Ahmad et al.
|
| 26 |
- **License:** Apache 2.0
|
| 27 |
-
- **Framework:** PyTorch, SpeechBrain
|
| 28 |
-
- **Embedding dimensionality:** 192
|
| 29 |
-
- **Sampling rate:** 16 kHz (mono)
|
| 30 |
-
- **Task:** Health-centric vocal fatigue representation learning
|
| 31 |
-
- **
|
| 32 |
-
|
|
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
This model represents a **state-of-the-art (SOTA) approach for ECAPA-based health embeddings**, outperforming conventional ECAPA-TDNN trained for speaker recognition.
|
| 52 |
|
| 53 |
---
|
| 54 |
|
| 55 |
-
##
|
| 56 |
|
| 57 |
-
|
| 58 |
-
-
|
| 59 |
-
-
|
| 60 |
-
|
| 61 |
-
-
|
| 62 |
-
-
|
| 63 |
-
|
| 64 |
-
### Out-of-Scope
|
| 65 |
-
- Speaker identification or verification
|
| 66 |
-
- Emotion recognition without retraining
|
| 67 |
-
- Medical diagnosis without professional oversight
|
| 68 |
|
| 69 |
---
|
| 70 |
|
| 71 |
-
##
|
| 72 |
-
|
| 73 |
-
- Real-world dataset: **~1.5 hours of speech from 70+ speakers**
|
| 74 |
-
- Labels: Healthy, Strained, Stressed
|
| 75 |
-
- Diverse microphones, devices, acoustic environments
|
| 76 |
-
- Gender-balanced, language-independent
|
| 77 |
-
- Preprocessed audio: **16 kHz, mono**, duration 5–10 seconds
|
| 78 |
-
|
| 79 |
-
---
|
| 80 |
-
|
| 81 |
-
## Training Procedure
|
| 82 |
-
|
| 83 |
-
- **Architecture:** ECAPA-TDNN
|
| 84 |
-
- **Training objective:** Supervised contrastive loss for health-state separability while minimizing speaker identity leakage
|
| 85 |
-
- **Embedding dimension:** 192
|
| 86 |
-
- **Optimizer:** Adam
|
| 87 |
-
- **Initialization:** Trained from scratch
|
| 88 |
-
|
| 89 |
-
---
|
| 90 |
|
| 91 |
-
##
|
| 92 |
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
| Model | Accuracy | Macro F1 | Healthy F1 | Strained F1 | Stressed F1 |
|
| 98 |
-
|------|----------|----------|------------|-------------|-------------|
|
| 99 |
-
| ECAPA-TDNN (SpeechBrain baseline) | 0.36 | 0.31 | 0.50 | 0.22 | 0.22 |
|
| 100 |
-
| **ECAPA-TDNN-VHE (Khubaib et al., 2026)** | **0.78** | **0.77** | **0.85** | **0.78** | **0.70** |
|
| 101 |
-
|
| 102 |
-
This demonstrates **state-of-the-art health-centric embedding performance** within ECAPA-based architectures.
|
| 103 |
-
|
| 104 |
-
---
|
| 105 |
-
|
| 106 |
-
## 📊 Radar Chart: Embedding Quality Comparison
|
| 107 |
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
|
| 111 |
-
- Recall
|
| 112 |
-
- F1-score
|
| 113 |
-
- Inter-class separation
|
| 114 |
-
- Intra-class compactness
|
| 115 |
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
-
##
|
| 121 |
-
|
| 122 |
-
| Rank | Model | Accuracy | Macro F1 |
|
| 123 |
-
|------|-------|----------|----------|
|
| 124 |
-
| **1** | **ECAPA-TDNN-VHE (Muhammad Khubaib Ahmad et al., 2026)** | **0.78** | **0.77** |
|
| 125 |
-
| 2 | ECAPA-TDNN (SpeechBrain baseline) | 0.36 | 0.31 |
|
| 126 |
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
---
|
| 130 |
|
| 131 |
-
## Inference
|
| 132 |
-
|
| 133 |
-
The model can be used via the Python library `auralis_vfs`:
|
| 134 |
-
|
| 135 |
-
```bash
|
| 136 |
-
pip install auralis_vfs
|
| 137 |
-
```
|
| 138 |
-
|
| 139 |
-
Example usage:
|
| 140 |
-
```python
|
| 141 |
-
from auralis.scorer import score_audio, score_waveform
|
| 142 |
-
|
| 143 |
-
# Score from a waveform array
|
| 144 |
-
score = score_waveform(audio_array)
|
| 145 |
-
|
| 146 |
-
# Score from an audio file
|
| 147 |
-
score = score_audio("sample.wav")
|
| 148 |
-
print(f"Vocal fatigue score: {score:.2f}")
|
| 149 |
-
```
|
| 150 |
-
|
| 151 |
-
The model is also deployed in the Auralis MLOps system, providing real-time fatigue monitoring and embedding-based analyses.
|
| 152 |
-
|
| 153 |
## Citation
|
| 154 |
|
| 155 |
-
If you use this model in your research, please cite:
|
| 156 |
-
|
| 157 |
```bibtex
|
| 158 |
-
@
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
|
|
|
| 165 |
}
|
| 166 |
-
```
|
| 167 |
-
|
| 168 |
-
## Future Work
|
| 169 |
|
| 170 |
-
|
| 171 |
-
-
|
| 172 |
-
|
| 173 |
-
|
|
|
|
|
|
|
|
|
|
| 174 |
|
|
|
|
| 175 |
|
| 176 |
-
##
|
| 177 |
|
| 178 |
-
|
|
|
|
| 14 |
- auralis-vfs
|
| 15 |
- audio-processing
|
| 16 |
- voice-analysis
|
| 17 |
+
- electroglottography
|
| 18 |
+
- virtual-egg
|
| 19 |
+
- laryngology
|
| 20 |
- research
|
| 21 |
---
|
| 22 |
|
| 23 |
+
# ECAPA-TDNN-VHE v2.0: Vocal Health Encoder & Virtual Electroglottography
|
| 24 |
|
| 25 |
## Model Details
|
| 26 |
|
| 27 |
+
- **Model name:** ECAPA-TDNN-VHE (Version 2.0)
|
| 28 |
+
- **Author:** Muhammad Khubaib Ahmad, Zheng Xiangyu, et al.
|
| 29 |
- **License:** Apache 2.0
|
| 30 |
+
- **Framework:** PyTorch, SpeechBrain
|
| 31 |
+
- **Embedding dimensionality:** 192
|
| 32 |
+
- **Sampling rate:** 16 kHz (mono)
|
| 33 |
+
- **Task:** Health-centric vocal fatigue representation learning, task-conditioned calibration, and cross-modal virtual electroglottography (Virtual EGG)
|
| 34 |
+
- **Associated Journal Publications:**
|
| 35 |
+
1. Xiangyu Z, Ahmad MK. Automated Vocal Fatigue Screening in Professional Voice Users: Development and Occupational Validation of an Automated Assessment System. *Journal of Voice*. 2026. [https://doi.org/10.1016/j.jvoice.2026.07.042](https://doi.org/10.1016/j.jvoice.2026.07.042) (Article PII: S0892-1997(26)00395-4, [ScienceDirect Link](https://www.sciencedirect.com/science/article/abs/pii/S0892199726003954))
|
| 36 |
+
2. Ahmad MK, Xiangyu Z. From Perceptual Strain to Glottal Contact Mechanics: Electroglottographic Grounding, Dynamic Pitch-Loading Calibration, and Cross-Modal Distillation of Contrastive Vocal Health Embeddings Across Laryngeal Pathologies. *Journal of Voice*. 2026.
|
| 37 |
|
| 38 |
---
|
| 39 |
|
| 40 |
+
## 🚀 What is New in Version 2.0?
|
| 41 |
|
| 42 |
+
Version 2.0 establishes the **first physiological ground-truth validation** of contrastive speech representations by linking ECAPA-TDNN-VHE embeddings directly to physical vocal fold contact mechanics using synchronized 50 kHz dual-electrode electroglottography (EGG) from the Saarbrücken Voice Database (SVD; Zenodo: 16874898).
|
| 43 |
|
| 44 |
+
### Key Scientific & Technical Additions:
|
| 45 |
|
| 46 |
+
1. **Physiological EGG Grounding ($r = 0.8586, p < .0001$)**:
|
| 47 |
+
- Canonical correlation analysis between the 192-D embedding subspace and 10 physical EGG contact biomechanics proved that contrastive learning naturally aligns latent dimensions along true glottal vibratory axes.
|
| 48 |
+
2. **Resolution of the Phonatory Task Manifold Shift**:
|
| 49 |
+
- Uncalibrated v1.0 models trained on connected speech misclassified healthy sustained vowels as severely strained (>120 points).
|
| 50 |
+
- v2.0 provides `task_conditioned_centroids_v2.npz` containing normative healthy reference anchors ($\mathbf{C}_h^{(t)}$) across modal vowels (`a_n`), low-pitch (`a_l`), high-pitch (`a_h`), glissando (`a_lhl`), and connected speech (`phrase`), restoring normative baselines (29–31 points) and enhancing discrimination ($d = +0.81$, AUC = 0.711).
|
| 51 |
+
3. **Within-Speaker Dynamic Pitch-Loading Calibration ($PSI$)**:
|
| 52 |
+
- `psi_calibrator_v2.npz` provides reference shift vectors and covariance matrices for computing the modal-anchored Phonatory Stress Index ($PSI$), unmasking latent neuromuscular paresis and structural mass lesions during pitch glissandos ($d = 1.65$).
|
| 53 |
+
4. **Hardware-Free Virtual Electroglottography (Virtual EGG)**:
|
| 54 |
+
- `virtual_egg_head_v2.npz` provides a distilled multi-output projection head ($\mathbf{W}_{\text{virt}}, \mathbf{b}_{\text{virt}}$) that reconstructs 9 cycle-resolved glottal contact parameters ($CQ$, $OQ$, $CQP$, $SQ_{\text{EGG}}$, $R_{\text{dEGG}}$, $dEGG_{\text{norm}}$, glottal $F_0$, jitter, shimmer) purely from microphone audio without physical neck electrodes.
|
|
|
|
| 55 |
|
| 56 |
---
|
| 57 |
|
| 58 |
+
## Model Files in this Repository
|
| 59 |
|
| 60 |
+
| File Name | Description | Size |
|
| 61 |
+
| :--- | :--- | :--- |
|
| 62 |
+
| **`ECAPA_TDNN_VHE.pth`** | Core PyTorch model weights (192-D bottleneck, supervised contrastive pre-training). | 8.8 MB |
|
| 63 |
+
| **`task_conditioned_centroids_v2.npz`** | Normative healthy and pathological reference centroids for all 5 phonatory tasks. | 25 KB |
|
| 64 |
+
| **`psi_calibrator_v2.npz`** | Within-speaker normative delta distributions and covariance inverses for PSI computation. | 1.18 MB |
|
| 65 |
+
| **`virtual_egg_head_v2.npz`** | Multi-output Virtual EGG projection weights ($\mathbf{W}_{\text{virt}}, \mathbf{b}_{\text{virt}}$) and feature normalization scalers. | 18 KB |
|
| 66 |
+
| **`radar_chart.png`** | Benchmark comparison against baseline ECAPA-TDNN across representation quality dimensions. | 165 KB |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
---
|
| 69 |
|
| 70 |
+
## Quickstart & Inference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
### Using the Python Library `auralis-vfs` (v2.0+)
|
| 73 |
|
| 74 |
+
```bash
|
| 75 |
+
pip install auralis-vfs
|
| 76 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
+
```python
|
| 79 |
+
import numpy as np
|
| 80 |
+
from auralis import score_v2, score_task_conditioned, predict_virtual_egg
|
| 81 |
+
|
| 82 |
+
# 1. Evaluate a comfortable modal sustained vowel /a/
|
| 83 |
+
sample_rate = 16000
|
| 84 |
+
waveform = np.random.randn(80000) # 5 seconds audio
|
| 85 |
+
|
| 86 |
+
result = score_v2(waveform, task="a_n")
|
| 87 |
+
print(f"Task-Conditioned Strain Score: {result['task_conditioned_score']:.2f} / 100")
|
| 88 |
+
print("Virtual EGG Biomechanical Parameters:")
|
| 89 |
+
for k, v in result["virtual_egg_biomarkers"].items():
|
| 90 |
+
print(f" - {k}: {v:.4f}")
|
| 91 |
+
|
| 92 |
+
# 2. Evaluate dynamic pitch glissando anchored to modal baseline
|
| 93 |
+
modal_wav = np.random.randn(80000)
|
| 94 |
+
gliss_wav = np.random.randn(80000)
|
| 95 |
+
|
| 96 |
+
result_gliss = score_v2(gliss_wav, task="a_lhl", baseline_modal_waveform=modal_wav)
|
| 97 |
+
print(f"Phonatory Stress Index (PSI): {result_gliss['psi_score']:.2f}")
|
| 98 |
+
# Normative healthy PSI: ~14.12
|
| 99 |
+
# Pathological laryngeal breakdown PSI: >20.0
|
| 100 |
+
```
|
| 101 |
|
| 102 |
+
### Loading Model Files with NumPy / PyTorch Directly
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
+
```python
|
| 105 |
+
import numpy as np
|
| 106 |
+
|
| 107 |
+
# Load v2 task-conditioned centroids
|
| 108 |
+
tc_data = np.load("task_conditioned_centroids_v2.npz")
|
| 109 |
+
c_modal = tc_data["unit_a_n"]
|
| 110 |
+
c_phrase = tc_data["unit_phrase"]
|
| 111 |
+
|
| 112 |
+
# Load Virtual EGG projection head
|
| 113 |
+
vegg_data = np.load("virtual_egg_head_v2.npz")
|
| 114 |
+
W_virt = vegg_data["W_virt"] # (204, 9)
|
| 115 |
+
b_virt = vegg_data["b_virt"] # (9,)
|
| 116 |
+
print("Loaded Virtual EGG projection matrix with shape:", W_virt.shape)
|
| 117 |
+
```
|
| 118 |
|
| 119 |
---
|
| 120 |
|
| 121 |
+
## Benchmark Performance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
+
| Evaluation Task | Baseline ECAPA-TDNN | Auralis-VFS v1.0 (Uncalibrated) | Auralis-VFS v2.0 (Proposed) |
|
| 124 |
+
| :--- | :---: | :---: | :---: |
|
| 125 |
+
| **Binary Dysphonia Screening (Acc / AUC)** | 62.4% / 0.651 | 79.7% / 0.771 | **84.2% / 0.850** |
|
| 126 |
+
| **3-Class Etiological Differentiation (Macro AUC)** | 0.582 | 0.694 | **0.755** (Approaches Oracle 0.776) |
|
| 127 |
+
| **Hyperfunctional vs RLN Paralysis (AUC)** | 0.548 | 0.662 | **0.751** (Pure Audio) |
|
| 128 |
+
| **Modal Sustained Vowel False-Positive Strain** | Severe (>110 pts) | Severe (129.80 pts) | **Resolved (31.55 ± 9.61 pts)** |
|
| 129 |
|
| 130 |
---
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
## Citation
|
| 133 |
|
|
|
|
|
|
|
| 134 |
```bibtex
|
| 135 |
+
@article{xiangyu2026automated,
|
| 136 |
+
title={Automated Vocal Fatigue Screening in Professional Voice Users: Development and Occupational Validation of an Automated Assessment System},
|
| 137 |
+
author={Xiangyu, Zheng and Ahmad, Muhammad Khubaib},
|
| 138 |
+
journal={Journal of Voice},
|
| 139 |
+
year={2026},
|
| 140 |
+
publisher={Elsevier},
|
| 141 |
+
doi={10.1016/j.jvoice.2026.07.042},
|
| 142 |
+
note={Article PII: S0892-1997(26)00395-4}
|
| 143 |
}
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
+
@article{ahmad2026glottal,
|
| 146 |
+
title={From Perceptual Strain to Glottal Contact Mechanics: Electroglottographic Grounding, Dynamic Pitch-Loading Calibration, and Cross-Modal Distillation of Contrastive Vocal Health Embeddings Across Laryngeal Pathologies},
|
| 147 |
+
author={Ahmad, Muhammad Khubaib and Xiangyu, Zheng},
|
| 148 |
+
journal={Journal of Voice},
|
| 149 |
+
year={2026}
|
| 150 |
+
}
|
| 151 |
+
```
|
| 152 |
|
| 153 |
+
---
|
| 154 |
|
| 155 |
+
## License
|
| 156 |
|
| 157 |
+
This model and repository are licensed under the Apache 2.0 License.
|
psi_calibrator_v2.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:490061194f2b5696fdad841e75d31383d3ca892914caec0a032a919f8e44bce4
|
| 3 |
+
size 1188820
|
task_conditioned_centroids_v2.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2814123b8ed2de6b76cd4cd2528eb2102aa57043dd4bad46189ba0bbd185c7fa
|
| 3 |
+
size 25692
|
virtual_egg_head_v2.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2390d00119b5bbf76771be7a7984ac5ae1dd33fa5548c543061bc4f78b39c8a0
|
| 3 |
+
size 17950
|