File size: 4,742 Bytes
4b95695
202d1e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4b95695
202d1e0
 
 
 
 
 
 
bf8eac3
 
 
 
 
 
 
202d1e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47d8076
 
 
 
 
 
 
 
 
 
 
 
 
 
202d1e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c6773d
 
 
 
 
 
202d1e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
license: cc-by-4.0
language:
- nl
- fr
- de
- it
- pl
- pt
- es
task_categories:
- text-to-speech
- automatic-speech-recognition
tags:
- mimi
- neural-codec
- multilingual
- mls
- multilingual-librispeech
- audio-tokens
pretty_name: Multilingual LibriSpeech Mimi Codes
size_categories:
- 1M<n<10M
---

# Multilingual LibriSpeech (MLS) — Mimi Codes

Pre-extracted [Kyutai Mimi](https://huggingface.co/kyutai/mimi) neural-codec tokens
for [Multilingual LibriSpeech](https://huggingface.co/datasets/facebook/multilingual_librispeech) —
LibriVox audiobooks in 7 non-English languages.

English is intentionally excluded. For English Mimi codes, use:

- [shangeth/librispeech-mimi-codes](https://huggingface.co/datasets/shangeth/librispeech-mimi-codes) — LibriSpeech (~280k rows, 7 splits)
- [shangeth/libritts-r-mimi-codes](https://huggingface.co/datasets/shangeth/libritts-r-mimi-codes) — LibriTTS-R (~360k rows, 7 splits, 24 kHz native)
- [shangeth/vctk-mimi-codes](https://huggingface.co/datasets/shangeth/vctk-mimi-codes) — VCTK (~44k rows, 110 speakers w/ accents)
- [shangeth/jenny-mimi-codes](https://huggingface.co/datasets/shangeth/jenny-mimi-codes) — Jenny TTS (~21k rows, single speaker)
- [shangeth/ljspeech-mimi-codes](https://huggingface.co/datasets/shangeth/ljspeech-mimi-codes) — LJSpeech (~13k rows, single speaker)

## Configs (languages)

One HF dataset config per language:

| Config | Language | ISO | Approx hours (train) |
|---|---|---|---|
| `dutch`      | Dutch       | nl | ~1.5k |
| `french`     | French      | fr | ~1.1k |
| `german`     | German      | de | ~3.3k |
| `italian`    | Italian     | it | ~250  |
| `polish`     | Polish      | pl | ~100  |
| `portuguese` | Portuguese  | pt | ~160  |
| `spanish`    | Spanish     | es | ~920  |

## Splits (per config)

| Split | Description |
|---|---|
| `train`   | full training set |
| `dev`     | development |
| `test`    | test |
| `9_hours` | low-resource ~9h training subset |
| `1_hours` | low-resource ~1h training subset |

### Merged `all` config

A virtual `all` config aliases the per-language parquets via glob — no extra
storage, just a YAML entry. Use it to train a single multilingual model:

```python
ds = load_dataset("shangeth/mls-mimi-codes", "all", split="train")
```

Caveat: there is no `language` column, and `speaker_id` is per-language —
so speaker IDs may collide across languages (e.g. German speaker `12345`
is unrelated to French speaker `12345`). If you need clean per-language
speaker bookkeeping, load each language config separately.

## Schema

| Column | Type | Notes |
|---|---|---|
| `id` | string | utterance ID, format `{speaker}_{chapter}_{segment}` |
| `text` | string | transcript, mixed-case as-is from MLS |
| `speaker_id` | int32 | speaker ID (parsed from MLS string) |
| `chapter_id` | int32 | chapter ID |
| `codes` | `int16[k=8][n_frames]` | Mimi codebook indices @ 12.5 fps |
| `n_frames` | int32 | |
| `k_codebooks` | int32 | 8 |

## Extraction details

- **Codec:** [`kyutai/mimi`](https://huggingface.co/kyutai/mimi) @ 24 kHz, 12.5 fps
- **Resampling:** MLS audio is 48 kHz opus → resampled to 24 kHz at extraction
- **Codebooks:** all 8 extracted; slice `codes[:k]` for fewer
- **Source:** [`facebook/multilingual_librispeech`](https://huggingface.co/datasets/facebook/multilingual_librispeech)

## Usage

```python
from datasets import load_dataset
import torch

ds = load_dataset("shangeth/mls-mimi-codes", "german", split="dev")
ex = ds[0]
codes = torch.tensor(ex["codes"], dtype=torch.long)  # [8, n_frames]
print(ex["id"], "| speaker:", ex["speaker_id"], "|", ex["text"][:60])

# Decode back to 24 kHz audio
from transformers import MimiModel
mimi = MimiModel.from_pretrained("kyutai/mimi").cuda().eval()
with torch.no_grad():
    wav = mimi.decode(codes.unsqueeze(0).cuda()).audio_values[0].cpu()
```

## Links

- **Dataset extraction code:** [github.com/shangeth/wren-datasets](https://github.com/shangeth/wren-datasets)
- **Wren research project:** [github.com/shangeth/wren](https://github.com/shangeth/wren)
- **TTS models trained on these codes:** [github.com/shangeth/wren-tts](https://github.com/shangeth/wren-tts)

## Citation

```bibtex
@misc{wren2026,
  title  = {Wren: A Family of Small Open-Weight Models for Unified Speech-Text Modelling},
  author = {Shangeth Rajaa},
  year   = {2026},
  url    = {https://github.com/shangeth/wren}
}

@inproceedings{pratap2020mls,
  title     = {MLS: A Large-Scale Multilingual Dataset for Speech Research},
  author    = {Pratap, Vineel and Xu, Qiantong and Sriram, Anuroop and Synnaeve, Gabriel and Collobert, Ronan},
  booktitle = {Interspeech},
  year      = {2020}
}
```

## License

CC-BY-4.0 (inherited from MLS / LibriVox).