shangeth commited on
Commit
ec62098
·
verified ·
1 Parent(s): 18b345c

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +128 -31
README.md CHANGED
@@ -1,33 +1,130 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: id
5
- dtype: string
6
- - name: text
7
- dtype: string
8
- - name: speaker_id
9
- dtype: int32
10
- - name: codes
11
- list:
12
- list: int16
13
- - name: n_frames
14
- dtype: int32
15
- - name: k_codebooks
16
- dtype: int32
17
- splits:
18
- - name: train_clean_100
19
- num_bytes: 79941329
20
- num_examples: 28539
21
- - name: train_clean_360
22
- num_bytes: 289118508
23
- num_examples: 104014
24
- download_size: 247169030
25
- dataset_size: 369059837
26
- configs:
27
- - config_name: default
28
- data_files:
29
- - split: train_clean_100
30
- path: data/train_clean_100-*
31
- - split: train_clean_360
32
- path: data/train_clean_360-*
33
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - text-to-speech
7
+ - automatic-speech-recognition
8
+ tags:
9
+ - mimi
10
+ - neural-codec
11
+ - speech-synthesis
12
+ - speech-recognition
13
+ - librispeech
14
+ - audio-tokens
15
+ pretty_name: LibriSpeech Mimi Codes
16
+ size_categories:
17
+ - 100K<n<1M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ---
19
+
20
+ # LibriSpeech — Mimi Codes
21
+
22
+ Pre-extracted [Kyutai Mimi](https://huggingface.co/kyutai/mimi) neural-codec tokens for the
23
+ [LibriSpeech](https://www.openslr.org/12) corpus — multi-speaker English audiobook readings
24
+ from the LibriVox project.
25
+
26
+ **This dataset contains codes only, not audio.** For waveforms, use any of the LibriSpeech
27
+ mirrors (e.g. [openslr/librispeech_asr](https://huggingface.co/datasets/openslr/librispeech_asr));
28
+ these codes let you skip the ~hours of GPU extraction needed to train Mimi-based speech models.
29
+
30
+ ## Schema
31
+
32
+ One row per utterance:
33
+
34
+ | Column | Type | Notes |
35
+ |---|---|---|
36
+ | `id` | string | `{speaker_id}-{chapter_id}-{utterance_id:04d}`, e.g. `103-1240-0000` |
37
+ | `text` | string | lowercased transcript |
38
+ | `speaker_id` | int32 | LibriSpeech speaker ID |
39
+ | `codes` | `int16[k=8][n_frames]` | Mimi codebook indices @ 12.5 fps |
40
+ | `n_frames` | int32 | = `codes.shape[1]` |
41
+ | `k_codebooks` | int32 | = 8 |
42
+
43
+ ## Extraction details
44
+
45
+ - **Codec:** [`kyutai/mimi`](https://huggingface.co/kyutai/mimi) @ 24 kHz, 12.5 fps
46
+ - **Codebooks:** all 8 extracted. Slice `codes[:k]` for fewer (Mimi's codebooks are ordered
47
+ by importance; the first few capture most of the signal).
48
+ - **Codebook size:** 2048 per codebook → values stored as `int16`
49
+ - **Transcripts:** sourced from LibriSpeech's `.trans.txt` files, **lowercased** (the raw
50
+ release is ALL-UPPER)
51
+
52
+ ## Splits
53
+
54
+ Each standard LibriSpeech split is a separate HF split (hyphens replaced with underscores):
55
+
56
+ | HF Split | Upstream | Approx. rows | Notes |
57
+ |---|---|---|---|
58
+ | `train_clean_100` | `train-clean-100` | ~28.5k | clean read speech, ~100 h |
59
+ | `train_clean_360` | `train-clean-360` | ~104.0k | clean read speech, ~360 h |
60
+ | `train_other_500` | `train-other-500` | ~148.7k | noisier/accented, ~500 h |
61
+ | `dev_clean` | `dev-clean` | ~2.7k | dev set, clean |
62
+ | `dev_other` | `dev-other` | ~2.9k | dev set, noisier |
63
+ | `test_clean` | `test-clean` | ~2.6k | test set, clean |
64
+ | `test_other` | `test-other` | ~2.9k | test set, noisier |
65
+
66
+ Only splits the publisher had on disk are included — consult the "Files" tab for the exact
67
+ subset in this release.
68
+
69
+ ## Usage
70
+
71
+ ```python
72
+ from datasets import load_dataset
73
+ import torch
74
+
75
+ ds = load_dataset("shangeth/librispeech-mimi-codes", split="train_clean_100")
76
+
77
+ ex = ds[0]
78
+ codes = torch.tensor(ex["codes"], dtype=torch.long) # [8, n_frames]
79
+ print(f"{ex['id']} (speaker {ex['speaker_id']}) → {ex['text'][:60]}")
80
+ print("codes:", codes.shape, "duration:", codes.shape[1] / 12.5, "s")
81
+
82
+ # Use only the first 3 codebooks:
83
+ codes_3 = codes[:3]
84
+ ```
85
+
86
+ Streaming (no full download):
87
+
88
+ ```python
89
+ ds = load_dataset("shangeth/librispeech-mimi-codes", split="train_clean_360", streaming=True)
90
+ for ex in ds.take(10):
91
+ print(ex["id"], len(ex["codes"]), "codebooks")
92
+ ```
93
+
94
+ Decode to audio with the Mimi decoder:
95
+
96
+ ```python
97
+ from transformers import MimiModel
98
+ mimi = MimiModel.from_pretrained("kyutai/mimi").cuda().eval()
99
+ with torch.no_grad():
100
+ wav = mimi.decode(codes.unsqueeze(0).cuda()).audio_values[0].cpu()
101
+ # wav is [1, T] @ 24 kHz
102
+ ```
103
+
104
+ ## License & Attribution
105
+
106
+ LibriSpeech is released under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
107
+ The derived Mimi codes inherit this license — **attribution is required**. Please cite
108
+ both the original corpus and this dataset when redistributing.
109
+
110
+ ## Citations
111
+
112
+ ```bibtex
113
+ @inproceedings{panayotov2015librispeech,
114
+ title = {Librispeech: an ASR corpus based on public domain audio books},
115
+ author = {Panayotov, Vassil and Chen, Guoguo and Povey, Daniel and Khudanpur, Sanjeev},
116
+ booktitle = {ICASSP},
117
+ year = {2015}
118
+ }
119
+
120
+ @article{defossez2024moshi,
121
+ title = {Moshi: a speech-text foundation model for real-time dialogue},
122
+ author = {D{\'e}fossez, Alexandre and others},
123
+ year = {2024}
124
+ }
125
+ ```
126
+
127
+ ## Related
128
+
129
+ Used to train the [Wren](https://huggingface.co/shangeth/Wren-TTS-360M-v1) series of
130
+ small speech LLMs.