Feature Extraction
Transformers
Safetensors
moss-audio-tokenizer
audio
audio-tokenizer
neural-codec
moss-tts-family
MOSS Audio Tokenizer
speech-tokenizer
trust-remote-code
custom_code
Instructions to use OpenMOSS-Team/MOSS-Audio-Tokenizer-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/MOSS-Audio-Tokenizer-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="OpenMOSS-Team/MOSS-Audio-Tokenizer-v2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenMOSS-Team/MOSS-Audio-Tokenizer-v2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload MOSS Audio Tokenizer v2
Browse files- .gitattributes +1 -1
- README.md +53 -0
- images/metric.png +3 -0
.gitattributes
CHANGED
|
@@ -46,4 +46,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 46 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 47 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 49 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -
|
|
|
|
| 46 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 47 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -132,6 +132,59 @@ batch_dec = model.batch_decode(codes_list, chunk_duration=0.08)
|
|
| 132 |
`model-00003-of-00003.safetensors`
|
| 133 |
- `demo/demo_gt.wav`
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
## Citation
|
| 136 |
If you use this code or result in your paper, please cite our work as:
|
| 137 |
```tex
|
|
|
|
| 132 |
`model-00003-of-00003.safetensors`
|
| 133 |
- `demo/demo_gt.wav`
|
| 134 |
|
| 135 |
+
## Evaluation Metrics
|
| 136 |
+
|
| 137 |
+
The table below compares the reconstruction quality of open-source audio tokenizers with MOSS-Audio-Tokenizer-v2 on speech and audio/music data.
|
| 138 |
+
|
| 139 |
+
- Speech metrics are evaluated on LibriSpeech test-clean (English) and AISHELL-2 (Chinese), reported as EN/ZH.
|
| 140 |
+
- Audio metrics are evaluated on the AudioSet evaluation subset, while music metrics are evaluated on MUSDB, reported as audio/music.
|
| 141 |
+
- STFT-Dist. denotes the STFT distance.
|
| 142 |
+
- Higher is better for speech metrics, while lower is better for audio/music metrics (Mel-Loss, STFT-Dist.).
|
| 143 |
+
- Nq denotes the number of quantizers.
|
| 144 |
+
|
| 145 |
+
| Model | bps | Frame rate | Nq | Speech: SIM β (EN/ZH) | Speech: STOI β (EN/ZH) | Speech: PESQ-NB β (EN/ZH) | Speech: PESQ-WB β (EN/ZH) | Audio/Music: Mel-Loss β | Audio/Music: STFT-Dist. β |
|
| 146 |
+
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 147 |
+
| **XCodec2.0** | 800 | 50 | 1 | 0.82 / 0.74 | 0.92 / 0.86 | 3.04 / 2.46 | 2.43 / 1.96 | -- / -- | -- / -- |
|
| 148 |
+
| **MiMo Audio Tokenizer** | 850 | 25 | 4 | 0.80 / 0.74 | 0.91 / 0.87 | 2.94 / 2.62 | 2.39 / 2.14 | **0.82** / 0.81 | 2.33 / 2.23 |
|
| 149 |
+
| **Higgs Audio Tokenizer** | 1000 | 25 | 4 | 0.77 / 0.68 | 0.83 / 0.82 | 3.03 / 2.61 | 2.48 / 2.14 | 0.83 / **0.80** | **2.20** / **2.05** |
|
| 150 |
+
| **SpeechTokenizer** | 1000 | 50 | 2 | 0.36 / 0.25 | 0.77 / 0.68 | 1.59 / 1.38 | 1.25 / 1.17 | -- / -- | -- / -- |
|
| 151 |
+
| **XY-Tokenizer** | 1000 | 12.5 | 8 | 0.85 / 0.79 | 0.92 / 0.87 | 3.10 / 2.63 | 2.50 / 2.12 | -- / -- | -- / -- |
|
| 152 |
+
| **BigCodec** | 1040 | 80 | 1 | 0.84 / 0.69 | 0.93 / 0.88 | 3.27 / 2.55 | 2.68 / 2.06 | -- / -- | -- / -- |
|
| 153 |
+
| **Mimi** | 1100 | 12.5 | 8 | 0.74 / 0.59 | 0.91 / 0.85 | 2.80 / 2.24 | 2.25 / 1.78 | 1.24 / 1.19 | 2.62 / 2.49 |
|
| 154 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 750 | 12.5 | 6 | 0.82 / 0.75 | 0.92 / 0.88 | 3.14 / 2.68 | 2.59 / 2.19 | 0.93 / 0.91 | 2.28 / 2.14 |
|
| 155 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 1000 | 12.5 | 8 | **0.88** / **0.80** | **0.94** / **0.90** | **3.39** / **2.93** | **2.88** / **2.43** | 0.88 / 0.86 | 2.22 / 2.07 |
|
| 156 |
+
| **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** |
|
| 157 |
+
| **DAC** | 1500 | 75 | 2 | 0.48 / 0.41 | 0.83 / 0.79 | 1.87 / 1.67 | 1.48 / 1.37 | -- / -- | -- / -- |
|
| 158 |
+
| **Encodec** | 1500 | 75 | 2 | 0.60 / 0.45 | 0.85 / 0.81 | 1.94 / 1.80 | 1.56 / 1.48 | 1.12 / 1.04 | 2.60 / 2.42 |
|
| 159 |
+
| **Higgs Audio Tokenizer** | 2000 | 25 | 8 | 0.90 / 0.83 | 0.85 / 0.85 | 3.59 / 3.22 | 3.11 / 2.73 | 0.74 / 0.70 | **2.07** / **1.92** |
|
| 160 |
+
| **SpeechTokenizer** | 2000 | 50 | 4 | 0.66 / 0.50 | 0.88 / 0.80 | 2.38 / 1.79 | 1.92 / 1.49 | -- / -- | -- / -- |
|
| 161 |
+
| **Qwen3 TTS Tokenizer** | 2200 | 12.5 | 16 | **0.95** / 0.88 | **0.96** / 0.93 | 3.66 / 3.10 | 3.19 / 2.62 | -- / -- | -- / -- |
|
| 162 |
+
| **MiMo Audio Tokenizer** | 2250 | 25 | 12 | 0.89 / 0.83 | 0.95 / 0.92 | 3.57 / 3.25 | 3.05 / 2.71 | **0.70** / **0.68** | 2.21 / 2.10 |
|
| 163 |
+
| **Mimi** | 2475 | 12.5 | 18 | 0.89 / 0.76 | 0.94 / 0.91 | 3.49 / 2.90 | 2.97 / 2.35 | 1.10 / 1.06 | 2.45 / 2.32 |
|
| 164 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 1500 | 12.5 | 12 | 0.93 / 0.86 | 0.95 / 0.92 | 3.66 / 3.24 | 3.23 / 2.77 | 0.83 / 0.79 | 2.15 / 1.98 |
|
| 165 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 2000 | 12.5 | 16 | **0.95** / **0.89** | **0.96** / **0.94** | **3.80** / **3.44** | **3.45** / **3.01** | 0.79 / 0.75 | 2.10 / 1.93 |
|
| 166 |
+
| **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** | **β** |
|
| 167 |
+
| **DAC** | 3000 | 75 | 4 | 0.74 / 0.67 | 0.90 / 0.88 | 2.76 / 2.47 | 2.31 / 2.07 | 0.86 / 0.83 | 2.23 / 2.10 |
|
| 168 |
+
| **MiMo Audio Tokenizer** | 3650 | 25 | 20 | 0.91 / 0.85 | 0.95 / 0.93 | 3.73 / 3.44 | 3.25 / 2.89 | 0.66 / 0.65 | 2.17 / 2.06 |
|
| 169 |
+
| **SpeechTokenizer** | 4000 | 50 | 8 | 0.85 / 0.69 | 0.92 / 0.85 | 3.05 / 2.20 | 2.60 / 1.87 | -- / -- | -- / -- |
|
| 170 |
+
| **Mimi** | 4400 | 12.5 | 32 | 0.94 / 0.83 | 0.96 / 0.94 | 3.80 / 3.31 | 3.43 / 2.78 | 1.02 / 0.98 | 2.34 / 2.21 |
|
| 171 |
+
| **Encodec** | 4500 | 75 | 6 | 0.86 / 0.75 | 0.92 / 0.91 | 2.91 / 2.63 | 2.46 / 2.15 | 0.91 / 0.84 | 2.33 / 2.17 |
|
| 172 |
+
| **DAC** | 6000 | 75 | 8 | 0.89 / 0.84 | 0.95 / 0.94 | 3.75 / 3.57 | 3.41 / 3.20 | **0.65** / **0.63** | **1.97** / 1.87 |
|
| 173 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 3000 | 12.5 | 24 | 0.96 / 0.92 | **0.97** / 0.95 | 3.94 / 3.64 | 3.66 / 3.28 | 0.75 / 0.71 | 2.04 / 1.87 |
|
| 174 |
+
| **MOSS-Audio-Tokenizer-v2 (Ours)** | 4000 | 12.5 | 32 | **0.97** / **0.93** | **0.97** / **0.96** | **3.98** / **3.72** | **3.75** / **3.39** | 0.73 / 0.69 | 2.02 / **1.84** |
|
| 175 |
+
|
| 176 |
+
### LibriSpeech Speech Metrics (MOSS-Audio-Tokenizer-v2 vs. Open-source Tokenizers)
|
| 177 |
+
|
| 178 |
+
The plots below compare our MOSS-Audio-Tokenizer-v2 model with other open-source speech tokenizers on the LibriSpeech dataset, evaluated with SIM, STOI, PESQ-NB, and PESQ-WB (higher is better).
|
| 179 |
+
We control the bps of the same model by adjusting the number of RVQ codebooks used during inference.
|
| 180 |
+
|
| 181 |
+
<table>
|
| 182 |
+
<tr>
|
| 183 |
+
<td align="center"><br><img src="images/metric.png" width="100%"></td>
|
| 184 |
+
</tr>
|
| 185 |
+
</table>
|
| 186 |
+
|
| 187 |
+
|
| 188 |
## Citation
|
| 189 |
If you use this code or result in your paper, please cite our work as:
|
| 190 |
```tex
|
images/metric.png
ADDED
|
Git LFS Details
|