Thorsten-Voice commited on
Commit
bdace62
·
verified ·
1 Parent(s): 257df72

Initial release: CC0 Piper base model (epochs 961 and 751)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +54 -0
  2. README.md +313 -0
  3. checkpoints/epoch=751-val_mel=0.3883.ckpt +3 -0
  4. checkpoints/epoch=961-val_mel=0.3871.ckpt +3 -0
  5. config.json +520 -0
  6. data/stats.csv +0 -0
  7. onnx/base_e751.onnx +3 -0
  8. onnx/base_e751.onnx.json +520 -0
  9. onnx/base_e961.onnx +3 -0
  10. onnx/base_e961.onnx.json +520 -0
  11. prep_tv44k_piper.py +173 -0
  12. runs/events.out.tfevents.piper-base +3 -0
  13. runs/hparams.yaml +66 -0
  14. samples/absatz.txt +1 -0
  15. samples/base_e751/absatz.wav +3 -0
  16. samples/base_e751/testsaetze/01.wav +3 -0
  17. samples/base_e751/testsaetze/02.wav +3 -0
  18. samples/base_e751/testsaetze/03.wav +3 -0
  19. samples/base_e751/testsaetze/04.wav +3 -0
  20. samples/base_e751/testsaetze/05.wav +3 -0
  21. samples/base_e751/testsaetze/06.wav +3 -0
  22. samples/base_e751/testsaetze/07.wav +3 -0
  23. samples/base_e751/testsaetze/08.wav +3 -0
  24. samples/base_e751/testsaetze/09.wav +3 -0
  25. samples/base_e751/testsaetze/10.wav +0 -0
  26. samples/base_e751/testsaetze/11.wav +0 -0
  27. samples/base_e751/testsaetze/12.wav +0 -0
  28. samples/base_e751/testsaetze/13.wav +3 -0
  29. samples/base_e751/testsaetze/14.wav +3 -0
  30. samples/base_e751/testsaetze/15.wav +3 -0
  31. samples/base_e751/testsaetze/16.wav +3 -0
  32. samples/base_e751/testsaetze/17.wav +3 -0
  33. samples/base_e751/testsaetze/18.wav +3 -0
  34. samples/base_e751/testsaetze/19.wav +3 -0
  35. samples/base_e751/testsaetze/20.wav +3 -0
  36. samples/base_e961/absatz.wav +3 -0
  37. samples/base_e961/testsaetze/01.wav +3 -0
  38. samples/base_e961/testsaetze/02.wav +3 -0
  39. samples/base_e961/testsaetze/03.wav +3 -0
  40. samples/base_e961/testsaetze/04.wav +3 -0
  41. samples/base_e961/testsaetze/05.wav +3 -0
  42. samples/base_e961/testsaetze/06.wav +3 -0
  43. samples/base_e961/testsaetze/07.wav +3 -0
  44. samples/base_e961/testsaetze/08.wav +3 -0
  45. samples/base_e961/testsaetze/09.wav +3 -0
  46. samples/base_e961/testsaetze/10.wav +0 -0
  47. samples/base_e961/testsaetze/11.wav +0 -0
  48. samples/base_e961/testsaetze/12.wav +0 -0
  49. samples/base_e961/testsaetze/13.wav +3 -0
  50. samples/base_e961/testsaetze/14.wav +3 -0
.gitattributes CHANGED
@@ -33,3 +33,57 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ samples/base_e751/absatz.wav filter=lfs diff=lfs merge=lfs -text
37
+ samples/base_e751/testsaetze/01.wav filter=lfs diff=lfs merge=lfs -text
38
+ samples/base_e751/testsaetze/02.wav filter=lfs diff=lfs merge=lfs -text
39
+ samples/base_e751/testsaetze/03.wav filter=lfs diff=lfs merge=lfs -text
40
+ samples/base_e751/testsaetze/04.wav filter=lfs diff=lfs merge=lfs -text
41
+ samples/base_e751/testsaetze/05.wav filter=lfs diff=lfs merge=lfs -text
42
+ samples/base_e751/testsaetze/06.wav filter=lfs diff=lfs merge=lfs -text
43
+ samples/base_e751/testsaetze/07.wav filter=lfs diff=lfs merge=lfs -text
44
+ samples/base_e751/testsaetze/08.wav filter=lfs diff=lfs merge=lfs -text
45
+ samples/base_e751/testsaetze/09.wav filter=lfs diff=lfs merge=lfs -text
46
+ samples/base_e751/testsaetze/13.wav filter=lfs diff=lfs merge=lfs -text
47
+ samples/base_e751/testsaetze/14.wav filter=lfs diff=lfs merge=lfs -text
48
+ samples/base_e751/testsaetze/15.wav filter=lfs diff=lfs merge=lfs -text
49
+ samples/base_e751/testsaetze/16.wav filter=lfs diff=lfs merge=lfs -text
50
+ samples/base_e751/testsaetze/17.wav filter=lfs diff=lfs merge=lfs -text
51
+ samples/base_e751/testsaetze/18.wav filter=lfs diff=lfs merge=lfs -text
52
+ samples/base_e751/testsaetze/19.wav filter=lfs diff=lfs merge=lfs -text
53
+ samples/base_e751/testsaetze/20.wav filter=lfs diff=lfs merge=lfs -text
54
+ samples/base_e961/absatz.wav filter=lfs diff=lfs merge=lfs -text
55
+ samples/base_e961/testsaetze/01.wav filter=lfs diff=lfs merge=lfs -text
56
+ samples/base_e961/testsaetze/02.wav filter=lfs diff=lfs merge=lfs -text
57
+ samples/base_e961/testsaetze/03.wav filter=lfs diff=lfs merge=lfs -text
58
+ samples/base_e961/testsaetze/04.wav filter=lfs diff=lfs merge=lfs -text
59
+ samples/base_e961/testsaetze/05.wav filter=lfs diff=lfs merge=lfs -text
60
+ samples/base_e961/testsaetze/06.wav filter=lfs diff=lfs merge=lfs -text
61
+ samples/base_e961/testsaetze/07.wav filter=lfs diff=lfs merge=lfs -text
62
+ samples/base_e961/testsaetze/08.wav filter=lfs diff=lfs merge=lfs -text
63
+ samples/base_e961/testsaetze/09.wav filter=lfs diff=lfs merge=lfs -text
64
+ samples/base_e961/testsaetze/13.wav filter=lfs diff=lfs merge=lfs -text
65
+ samples/base_e961/testsaetze/14.wav filter=lfs diff=lfs merge=lfs -text
66
+ samples/base_e961/testsaetze/15.wav filter=lfs diff=lfs merge=lfs -text
67
+ samples/base_e961/testsaetze/16.wav filter=lfs diff=lfs merge=lfs -text
68
+ samples/base_e961/testsaetze/17.wav filter=lfs diff=lfs merge=lfs -text
69
+ samples/base_e961/testsaetze/18.wav filter=lfs diff=lfs merge=lfs -text
70
+ samples/base_e961/testsaetze/19.wav filter=lfs diff=lfs merge=lfs -text
71
+ samples/base_e961/testsaetze/20.wav filter=lfs diff=lfs merge=lfs -text
72
+ samples/scratch_e1799/absatz.wav filter=lfs diff=lfs merge=lfs -text
73
+ samples/scratch_e1799/testsaetze/01.wav filter=lfs diff=lfs merge=lfs -text
74
+ samples/scratch_e1799/testsaetze/02.wav filter=lfs diff=lfs merge=lfs -text
75
+ samples/scratch_e1799/testsaetze/03.wav filter=lfs diff=lfs merge=lfs -text
76
+ samples/scratch_e1799/testsaetze/04.wav filter=lfs diff=lfs merge=lfs -text
77
+ samples/scratch_e1799/testsaetze/05.wav filter=lfs diff=lfs merge=lfs -text
78
+ samples/scratch_e1799/testsaetze/06.wav filter=lfs diff=lfs merge=lfs -text
79
+ samples/scratch_e1799/testsaetze/07.wav filter=lfs diff=lfs merge=lfs -text
80
+ samples/scratch_e1799/testsaetze/08.wav filter=lfs diff=lfs merge=lfs -text
81
+ samples/scratch_e1799/testsaetze/09.wav filter=lfs diff=lfs merge=lfs -text
82
+ samples/scratch_e1799/testsaetze/13.wav filter=lfs diff=lfs merge=lfs -text
83
+ samples/scratch_e1799/testsaetze/14.wav filter=lfs diff=lfs merge=lfs -text
84
+ samples/scratch_e1799/testsaetze/15.wav filter=lfs diff=lfs merge=lfs -text
85
+ samples/scratch_e1799/testsaetze/16.wav filter=lfs diff=lfs merge=lfs -text
86
+ samples/scratch_e1799/testsaetze/17.wav filter=lfs diff=lfs merge=lfs -text
87
+ samples/scratch_e1799/testsaetze/18.wav filter=lfs diff=lfs merge=lfs -text
88
+ samples/scratch_e1799/testsaetze/19.wav filter=lfs diff=lfs merge=lfs -text
89
+ samples/scratch_e1799/testsaetze/20.wav filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ language:
4
+ - de
5
+ pipeline_tag: text-to-speech
6
+ library_name: piper
7
+ tags:
8
+ - text-to-speech
9
+ - tts
10
+ - piper
11
+ - vits
12
+ - german
13
+ - cc0
14
+ - base-model
15
+ datasets:
16
+ - Thorsten-Voice/TV-44kHz-Full
17
+ base_model: Thorsten-Voice/Piper-Scratch
18
+ ---
19
+
20
+ # Thorsten-Voice Piper Base (German, male, CC0)
21
+
22
+ A German male **Piper base model trained exclusively on CC0 data**, with no lessac checkpoint or any other third-party model anywhere in its history.
23
+
24
+ **This model is primarily meant as a starting point for fine-tuning.** If you want to train your own Piper voice and need to be sure that no restrictively licensed data is hidden somewhere in the model's ancestry, this is what it was made for. You *can* use it directly as a voice (see [Using the model directly](#using-the-model-directly-with-piper)), but the main part of this documentation explains how to fine-tune your own Piper voice on top of it.
25
+
26
+ > **Why does this exist?** Most Piper voices are fine-tuned from the `lessac` checkpoint, whose dataset license is unclear for commercial use. This base model offers a fully CC0 alternative for German male voices.
27
+
28
+ ---
29
+
30
+ ## Contents
31
+
32
+ - [Provenance](#provenance)
33
+ - [Files in this repository](#files-in-this-repository)
34
+ - [Audio samples](#audio-samples)
35
+ - [Fine-tuning guide](#fine-tuning-guide) ← main part
36
+ - [Using the model directly with Piper](#using-the-model-directly-with-piper)
37
+ - [Training details](#training-details)
38
+ - [Limitations](#limitations)
39
+ - [License](#license)
40
+
41
+ ---
42
+
43
+ ## Provenance
44
+
45
+ Every step of this chain uses only Thorsten Müller's own recordings, released as CC0:
46
+
47
+ ```
48
+ 1. Piper-Scratch trained from scratch (random init, no lessac, no warmstart)
49
+ on Thorsten-Voice 2022.10-Neutral, ~10 h, 1800 epochs
50
+ → https://huggingface.co/Thorsten-Voice/Piper-Scratch
51
+ │
52
+ ▼ warmstart (weights only, epoch 1799)
53
+ 2. This base trained on Thorsten-Voice 2021.02-Neutral + 2022.10-Neutral,
54
+ ~32.4 h, 1000 epochs
55
+ ```
56
+
57
+ All training data: [Thorsten-Voice/TV-44kHz-Full](https://huggingface.co/datasets/Thorsten-Voice/TV-44kHz-Full) (CC0).
58
+
59
+ ---
60
+
61
+ ## Files in this repository
62
+
63
+ | Path | Purpose |
64
+ |---|---|
65
+ | `checkpoints/epoch=961-val_mel=0.3871.ckpt` | **Recommended base for fine-tuning.** Best validation mel loss of the whole run. |
66
+ | `checkpoints/epoch=751-val_mel=0.3883.ckpt` | Alternative base from an earlier stage of the run. Equivalent in blind listening tests. |
67
+ | `config.json` | Piper config (phoneme map, audio settings), required for training and inference |
68
+ | `onnx/` | Exported ONNX models + `.onnx.json` for direct use with Piper |
69
+ | `samples/` | Audio samples (identical texts for every model) |
70
+ | `runs/` | TensorBoard event file and `hparams.yaml` of the full training run |
71
+ | `data/stats.csv` | Per-utterance statistics (subset, style, microphone, duration) of the training data |
72
+ | `prep_tv44k_piper.py` | The data preparation script used for this model |
73
+
74
+ The `.ckpt` files (≈ 800 MB each) contain generator **and** discriminator weights. Use them for fine-tuning: starting with a trained discriminator makes fine-tuning considerably more stable. The ONNX files are for inference only and cannot be used for training.
75
+
76
+ ---
77
+
78
+ ## Audio samples
79
+
80
+ All samples use the same texts. `samples/absatz.txt` contains the long paragraph; `testsaetze/` contains 20 short test sentences.
81
+
82
+ | Model | Paragraph |
83
+ |---|---|
84
+ | Piper-Scratch (epoch 1799, ~10 h) | <audio controls src="https://huggingface.co/Thorsten-Voice/Piper-Base/resolve/main/samples/scratch_e1799/absatz.wav"></audio> |
85
+ | **Base, epoch 961** (recommended) | <audio controls src="https://huggingface.co/Thorsten-Voice/Piper-Base/resolve/main/samples/base_e961/absatz.wav"></audio> |
86
+ | Base, epoch 751 | <audio controls src="https://huggingface.co/Thorsten-Voice/Piper-Base/resolve/main/samples/base_e751/absatz.wav"></audio> |
87
+
88
+ ---
89
+
90
+ ## Fine-tuning guide
91
+
92
+ This guide shows how to fine-tune your own Piper voice on top of this base model. The example uses the CC0 dataset *Thorsten-Voice 2022.10-Neutral*. The same steps apply to your own recordings.
93
+
94
+ ### 0. A note on licensing
95
+
96
+ The base model is CC0. **The license of your fine-tuned voice depends on the data you fine-tune with.** If you use only CC0 data (or your own recordings that you release as CC0), the whole chain stays CC0. If you use data under other licenses, those terms apply to your result.
97
+
98
+ ### 1. Requirements
99
+
100
+ - Linux with an NVIDIA GPU. 24 GB VRAM is comfortable; this base was trained on a 48 GB A40 with batch size 32 using ~39 GB. Reduce `batch_size` on smaller cards.
101
+ - [piper1-gpl](https://github.com/OHF-Voice/piper1-gpl), installed for training as described in its training documentation.
102
+ - `espeak-ng`.
103
+ - Additional Python packages that are not always pulled in by `[train]`:
104
+ - `torchaudio`: needed for the UTMOS-based `val_mos` metric. Without it, training can crash after the first epoch.
105
+ - `onnxscript`: needed for ONNX export.
106
+ - Disk space: the training cache needs roughly **1 GB per hour of audio** (audio and spectrograms are cached as tensors), plus about 9 GB for checkpoints. Lightning keeps the 5 best checkpoints per metric plus `last.ckpt`, each ≈ 800 MB.
107
+
108
+ ### 2. Prepare your data
109
+
110
+ piper1-gpl expects:
111
+
112
+ - a folder with WAV files: **22,050 Hz, mono, 16-bit PCM**
113
+ - a `metadata.csv` with one line per file, in the form `filename.wav|Text of the utterance`
114
+
115
+ Recommendations for good results:
116
+
117
+ - **One speaker**, consistent recording setup, little background noise.
118
+ - Trim leading and trailing silence and leave a short pad (~0.15 s).
119
+ - Normalize loudness across all files (for example to −23 LUFS). Mixed loudness gets learned as unwanted variation.
120
+ - Remove clips with clipping, cut-off endings, or text that doesn't match the audio.
121
+ - Keep utterances roughly between 1 and 15 seconds.
122
+ - More data helps, but even a few hours of clean recordings work well on top of a base model.
123
+
124
+ **Example: Thorsten-Voice 2022.10 (CC0).** The script in this repository downloads the dataset from Hugging Face, filters it, resamples it to 22,050 Hz and writes `metadata.csv`:
125
+
126
+ ```bash
127
+ pip install datasets soundfile soxr librosa pyloudnorm
128
+ python prep_tv44k_piper.py --out ./tv_2022 --subsets TV-2022.10-Neutral
129
+ ```
130
+
131
+ It prints how many hours were written and how many clips were discarded for which reason, and writes per-clip statistics to `stats.csv`. For your own recordings, adapt the loading part or apply the same steps with tools of your choice.
132
+
133
+ ### 3. Download the base checkpoint
134
+
135
+ ```bash
136
+ hf download Thorsten-Voice/Piper-Base \
137
+ "checkpoints/epoch=961-val_mel=0.3871.ckpt" config.json \
138
+ --local-dir ./base
139
+ ```
140
+
141
+ (Older installations use `huggingface-cli download` with the same arguments.)
142
+
143
+ ### 4. Start the fine-tuning
144
+
145
+ ```bash
146
+ python3 -m piper.train fit \
147
+ --data.voice_name "de_DE-myvoice-medium" \
148
+ --data.csv_path ./tv_2022/metadata.csv \
149
+ --data.audio_dir ./tv_2022/wavs \
150
+ --data.espeak_voice "de" \
151
+ --data.cache_dir ./tv_2022/cache \
152
+ --data.config_path ./tv_2022/config.json \
153
+ --data.batch_size 32 \
154
+ --data.num_workers 8 \
155
+ --data.validation_split 0.02 \
156
+ --model.sample_rate 22050 \
157
+ --model.warmstart_ckpt "./base/checkpoints/epoch=961-val_mel=0.3871.ckpt" \
158
+ --trainer.default_root_dir ./runs \
159
+ --trainer.max_epochs 300
160
+ ```
161
+
162
+ What the important options do:
163
+
164
+ | Option | Notes |
165
+ |---|---|
166
+ | `--model.warmstart_ckpt` | Loads the base model's **weights only**. Optimizer, learning-rate schedule and epoch counter start fresh, which is what you want for fine-tuning. The log should report all parameters as copied and none skipped. |
167
+ | `--trainer.max_epochs` | **Also controls the learning-rate schedule**: the learning rate is annealed to 5 % of its initial value over exactly this many epochs. Set it to what you actually intend to run. Stopping early leaves the learning rate high. |
168
+ | `--data.num_workers` | The default is 1, which starves the GPU. 8–12 workers took GPU utilization from ~40 % to ~75–100 % in this project. |
169
+ | `--data.batch_size` | 32 used ~39 GB VRAM. Reduce if you run out of memory; avoid changing the utterance length limits instead. |
170
+ | `--data.espeak_voice` | `de` for German. The base model has only seen German phonemes (see [Limitations](#limitations)). |
171
+ | `--data.config_path` | Written by the training run. Copy this file next to your exported ONNX model later. |
172
+
173
+ How many epochs? There is no single right answer. It depends on how much data you have and how far your voice is from Thorsten's. A practical approach is to set a moderate `max_epochs`, listen to intermediate checkpoints, and resume with `--ckpt_path <run>/checkpoints/last.ckpt` if you want to continue. A resumed run continues the learning-rate schedule seamlessly.
174
+
175
+ Run the training inside `tmux` or `screen` so it survives a closed SSH session.
176
+
177
+ > **Expected warning:** piper1-gpl may warn about low "vocoder coverage" (fewer than ~150 passes over the training waveform). With a warmstarted decoder this is much less of a concern than when training from scratch. Judge by listening.
178
+
179
+ ### 5. Monitor the training
180
+
181
+ ```bash
182
+ tensorboard --logdir ./runs/lightning_logs --port 6006
183
+ # on your local machine:
184
+ ssh -L 6006:localhost:6006 user@server → open http://localhost:6006
185
+ ```
186
+
187
+ The metrics worth watching:
188
+
189
+ - **`val_mel`**: the main metric, and the one checkpoints are named after. It should fall steadily and flatten out over time.
190
+ - **`val_mos`**: automatic quality estimate (UTMOS). It is noisy, so look at the trend and don't pick checkpoints by it alone.
191
+ - **`val_kl`, `val_fm`**: slowly rising values are common with VITS and were harmless in this run, as long as `val_mel` and the actual sound keep improving.
192
+
193
+ New `epoch=…-val_mel=…ckpt` files keep appearing as long as the model is still improving.
194
+
195
+ ### 6. Listen and choose a checkpoint
196
+
197
+ Metrics only tell half the story. Synthesize the same set of sentences with several checkpoints and compare them, ideally **blind** (randomized A/B order, key opened only afterwards). In this project, differences that looked meaningful in the curves were often inaudible, and vice versa.
198
+
199
+ ### 7. Export to ONNX
200
+
201
+ ```bash
202
+ python3 -m piper.train.export_onnx \
203
+ --checkpoint "./runs/lightning_logs/version_0/checkpoints/epoch=XXX-val_mel=X.XXXX.ckpt" \
204
+ --output-file de_DE-myvoice-medium.onnx
205
+ cp ./tv_2022/config.json de_DE-myvoice-medium.onnx.json
206
+ ```
207
+
208
+ > **Known issue with recent PyTorch versions:** the new dynamo-based ONNX exporter fails on VITS' spline flows (a data-dependent assert in `transforms.py`). Passing `dynamo=False` to `torch.onnx.export` in piper1-gpl's `export_onnx.py` fixes it. The export also requires `onnxscript`. Tracer warnings during export are normal.
209
+
210
+ ### 8. Test your voice
211
+
212
+ ```bash
213
+ echo "Hallo, das ist meine eigene Piper-Stimme." | \
214
+ python3 -m piper -m de_DE-myvoice-medium.onnx -f test.wav
215
+ ```
216
+
217
+ Piper looks for the config automatically as `<model>.onnx.json` next to the `.onnx` file.
218
+
219
+ ---
220
+
221
+ ## Using the model directly with Piper
222
+
223
+ The base model is a complete, working voice and can be used as-is, even though it was not primarily designed for that. Download an ONNX model together with its `.onnx.json` and use it like any other Piper voice:
224
+
225
+ ```bash
226
+ hf download Thorsten-Voice/Piper-Base \
227
+ onnx/base_e961.onnx onnx/base_e961.onnx.json --local-dir .
228
+
229
+ echo "Guten Morgen! Wie geht es dir heute?" | \
230
+ python3 -m piper -m onnx/base_e961.onnx --length-scale 0.85 -f output.wav
231
+ ```
232
+
233
+ **Recommendation: `length_scale` ≈ 0.82–0.85.** About 70 % of the training data comes from the 2021 recordings, which were spoken slowly and very carefully. The base model inherits that tempo. To make this the default for every application, including Home Assistant, set it in the `.onnx.json`:
234
+
235
+ ```json
236
+ "inference": {
237
+ "noise_scale": 0.667,
238
+ "length_scale": 0.85,
239
+ "noise_w": 0.8
240
+ }
241
+ ```
242
+
243
+ For the best quality of Thorsten's own voice, use the dedicated Thorsten-Voice Piper models, or fine-tune this base on the 2022.10 dataset as shown above.
244
+
245
+ ---
246
+
247
+ ## Training details
248
+
249
+ ### Data
250
+
251
+ | Subset | Hours | Notes |
252
+ |---|---|---|
253
+ | TV-2021.02-Neutral | 22.7 h | slow, very clear articulation; partly recorded with a USB headset |
254
+ | TV-2022.10-Neutral | 9.7 h | studio microphone (Rode Podcaster), more natural tempo |
255
+ | **Total** | **32.4 h** | 34,345 utterances, single speaker |
256
+
257
+ Not used: *2021.06-Emotional* (extreme styles such as whispering, drunk and sleepy were excluded; all remaining clips were flagged as possibly cut off at the end) and *2023.09-Hessisch* (dialect).
258
+
259
+ Preprocessing (`prep_tv44k_piper.py`): silence trimming with 0.15 s padding, loudness normalization to −23 LUFS, peak limiting to −1 dBFS, resampling 44.1 kHz → 22.05 kHz (soxr VHQ). Discarded clips: those with comments in the dataset, durations outside 0.8–15 s, implausible characters per second (outside 6–25, a hint at text/audio mismatches) or clipping.
260
+
261
+ ### Training
262
+
263
+ | Setting | Value |
264
+ |---|---|
265
+ | Framework | piper1-gpl (VITS), quality `medium` |
266
+ | Sample rate | 22,050 Hz |
267
+ | Initialization | warmstart from Piper-Scratch, epoch 1799 (784/784 parameters copied) |
268
+ | Epochs | 1000 (1051 steps per epoch) |
269
+ | Batch size | 32 |
270
+ | Validation split | 2 % |
271
+ | Learning rate | annealed to 5 % of the initial value over 1000 epochs |
272
+ | Hardware | 1 × NVIDIA A40 (48 GB), ~12–15 min per epoch, ~10 days total |
273
+
274
+ The full TensorBoard log is included in `runs/`.
275
+
276
+ ### Results
277
+
278
+ | Checkpoint | `val_mel` | Notes |
279
+ |---|---|---|
280
+ | epoch 1 | 0.4579 | start of the run |
281
+ | epoch 751 | 0.3883 | best value of the middle phase |
282
+ | **epoch 961** | **0.3871** | **best value of the entire run** |
283
+ | epoch 999 | ~0.388 | final state |
284
+
285
+ Best `val_mos` (UTMOS estimate): 3.67 at epoch 892.
286
+
287
+ Blind A/B listening tests with 20 sentences each:
288
+
289
+ - epoch 615 vs. 751: **10 : 10**. No audible difference.
290
+ - epoch 961 vs. 999: **12 : 8** in favour of 961. Slight tendency, not statistically significant.
291
+
292
+ Compared with Piper-Scratch (10 h only), the base model pronounces and stresses less common words clearly more naturally. That was the purpose of the additional data.
293
+
294
+ ---
295
+
296
+ ## Limitations
297
+
298
+ - **German only.** The base has only seen German phonemes from espeak-ng. Fine-tuning for other languages may work for shared sounds but has not been tested.
299
+ - **Slower speaking tempo** inherited from the 2021 recordings (see above). Fine-tuning adopts the tempo of the target voice.
300
+ - **Recording quality:** most of the data was recorded with a headset, so the base sounds somewhat duller than studio recordings. Fine-tuning on clean data recovers clarity.
301
+ - **Phonemization errors** come from espeak-ng, not from the model. Example: "Intendantin" is stressed incorrectly. These can be fixed with custom espeak-ng dictionary entries, without retraining.
302
+ - **Quality level `medium` only.**
303
+
304
+ ---
305
+
306
+ ## License
307
+
308
+ **CC0 1.0 Universal.** Model, checkpoints, configuration, samples and scripts are dedicated to the public domain. No attribution is required, but it is always appreciated.
309
+
310
+ ## Credits
311
+
312
+ - Voice, recordings, datasets and training: **Thorsten Müller** / [Thorsten-Voice](https://www.thorsten-voice.de)
313
+ - [Piper](https://github.com/OHF-Voice/piper1-gpl) by Michael Hansen and the Open Home Foundation
checkpoints/epoch=751-val_mel=0.3883.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b41d24e4a28c1bc2ebc4b6df56fe39c98917675752e7ba5c42a3a4dbfa62df0a
3
+ size 845913197
checkpoints/epoch=961-val_mel=0.3871.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:058da3e98362630ada5c0d9f1c862a6810d606b5261f5699920550799e819e0a
3
+ size 845913197
config.json ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio": {
3
+ "sample_rate": 22050
4
+ },
5
+ "espeak": {
6
+ "voice": "de"
7
+ },
8
+ "phoneme_type": "espeak",
9
+ "num_symbols": 256,
10
+ "num_speakers": 1,
11
+ "inference": {
12
+ "noise_scale": 0.667,
13
+ "length_scale": 1.0,
14
+ "noise_w": 0.8
15
+ },
16
+ "phoneme_id_map": {
17
+ "_": [
18
+ 0
19
+ ],
20
+ "^": [
21
+ 1
22
+ ],
23
+ "$": [
24
+ 2
25
+ ],
26
+ " ": [
27
+ 3
28
+ ],
29
+ "!": [
30
+ 4
31
+ ],
32
+ "'": [
33
+ 5
34
+ ],
35
+ "(": [
36
+ 6
37
+ ],
38
+ ")": [
39
+ 7
40
+ ],
41
+ ",": [
42
+ 8
43
+ ],
44
+ "-": [
45
+ 9
46
+ ],
47
+ ".": [
48
+ 10
49
+ ],
50
+ ":": [
51
+ 11
52
+ ],
53
+ ";": [
54
+ 12
55
+ ],
56
+ "?": [
57
+ 13
58
+ ],
59
+ "a": [
60
+ 14
61
+ ],
62
+ "b": [
63
+ 15
64
+ ],
65
+ "c": [
66
+ 16
67
+ ],
68
+ "d": [
69
+ 17
70
+ ],
71
+ "e": [
72
+ 18
73
+ ],
74
+ "f": [
75
+ 19
76
+ ],
77
+ "h": [
78
+ 20
79
+ ],
80
+ "i": [
81
+ 21
82
+ ],
83
+ "j": [
84
+ 22
85
+ ],
86
+ "k": [
87
+ 23
88
+ ],
89
+ "l": [
90
+ 24
91
+ ],
92
+ "m": [
93
+ 25
94
+ ],
95
+ "n": [
96
+ 26
97
+ ],
98
+ "o": [
99
+ 27
100
+ ],
101
+ "p": [
102
+ 28
103
+ ],
104
+ "q": [
105
+ 29
106
+ ],
107
+ "r": [
108
+ 30
109
+ ],
110
+ "s": [
111
+ 31
112
+ ],
113
+ "t": [
114
+ 32
115
+ ],
116
+ "u": [
117
+ 33
118
+ ],
119
+ "v": [
120
+ 34
121
+ ],
122
+ "w": [
123
+ 35
124
+ ],
125
+ "x": [
126
+ 36
127
+ ],
128
+ "y": [
129
+ 37
130
+ ],
131
+ "z": [
132
+ 38
133
+ ],
134
+ "æ": [
135
+ 39
136
+ ],
137
+ "ç": [
138
+ 40
139
+ ],
140
+ "ð": [
141
+ 41
142
+ ],
143
+ "ø": [
144
+ 42
145
+ ],
146
+ "ħ": [
147
+ 43
148
+ ],
149
+ "ŋ": [
150
+ 44
151
+ ],
152
+ "œ": [
153
+ 45
154
+ ],
155
+ "ǀ": [
156
+ 46
157
+ ],
158
+ "ǁ": [
159
+ 47
160
+ ],
161
+ "ǂ": [
162
+ 48
163
+ ],
164
+ "ǃ": [
165
+ 49
166
+ ],
167
+ "ɐ": [
168
+ 50
169
+ ],
170
+ "ɑ": [
171
+ 51
172
+ ],
173
+ "ɒ": [
174
+ 52
175
+ ],
176
+ "ɓ": [
177
+ 53
178
+ ],
179
+ "ɔ": [
180
+ 54
181
+ ],
182
+ "ɕ": [
183
+ 55
184
+ ],
185
+ "ɖ": [
186
+ 56
187
+ ],
188
+ "ɗ": [
189
+ 57
190
+ ],
191
+ "ɘ": [
192
+ 58
193
+ ],
194
+ "ə": [
195
+ 59
196
+ ],
197
+ "ɚ": [
198
+ 60
199
+ ],
200
+ "ɛ": [
201
+ 61
202
+ ],
203
+ "ɜ": [
204
+ 62
205
+ ],
206
+ "ɞ": [
207
+ 63
208
+ ],
209
+ "ɟ": [
210
+ 64
211
+ ],
212
+ "ɠ": [
213
+ 65
214
+ ],
215
+ "ɡ": [
216
+ 66
217
+ ],
218
+ "ɢ": [
219
+ 67
220
+ ],
221
+ "ɣ": [
222
+ 68
223
+ ],
224
+ "ɤ": [
225
+ 69
226
+ ],
227
+ "ɥ": [
228
+ 70
229
+ ],
230
+ "ɦ": [
231
+ 71
232
+ ],
233
+ "ɧ": [
234
+ 72
235
+ ],
236
+ "ɨ": [
237
+ 73
238
+ ],
239
+ "ɪ": [
240
+ 74
241
+ ],
242
+ "ɫ": [
243
+ 75
244
+ ],
245
+ "ɬ": [
246
+ 76
247
+ ],
248
+ "ɭ": [
249
+ 77
250
+ ],
251
+ "ɮ": [
252
+ 78
253
+ ],
254
+ "ɯ": [
255
+ 79
256
+ ],
257
+ "ɰ": [
258
+ 80
259
+ ],
260
+ "ɱ": [
261
+ 81
262
+ ],
263
+ "ɲ": [
264
+ 82
265
+ ],
266
+ "ɳ": [
267
+ 83
268
+ ],
269
+ "ɴ": [
270
+ 84
271
+ ],
272
+ "ɵ": [
273
+ 85
274
+ ],
275
+ "ɶ": [
276
+ 86
277
+ ],
278
+ "ɸ": [
279
+ 87
280
+ ],
281
+ "ɹ": [
282
+ 88
283
+ ],
284
+ "ɺ": [
285
+ 89
286
+ ],
287
+ "ɻ": [
288
+ 90
289
+ ],
290
+ "ɽ": [
291
+ 91
292
+ ],
293
+ "ɾ": [
294
+ 92
295
+ ],
296
+ "ʀ": [
297
+ 93
298
+ ],
299
+ "ʁ": [
300
+ 94
301
+ ],
302
+ "ʂ": [
303
+ 95
304
+ ],
305
+ "ʃ": [
306
+ 96
307
+ ],
308
+ "ʄ": [
309
+ 97
310
+ ],
311
+ "ʈ": [
312
+ 98
313
+ ],
314
+ "ʉ": [
315
+ 99
316
+ ],
317
+ "ʊ": [
318
+ 100
319
+ ],
320
+ "ʋ": [
321
+ 101
322
+ ],
323
+ "ʌ": [
324
+ 102
325
+ ],
326
+ "ʍ": [
327
+ 103
328
+ ],
329
+ "ʎ": [
330
+ 104
331
+ ],
332
+ "ʏ": [
333
+ 105
334
+ ],
335
+ "ʐ": [
336
+ 106
337
+ ],
338
+ "ʑ": [
339
+ 107
340
+ ],
341
+ "ʒ": [
342
+ 108
343
+ ],
344
+ "ʔ": [
345
+ 109
346
+ ],
347
+ "ʕ": [
348
+ 110
349
+ ],
350
+ "ʘ": [
351
+ 111
352
+ ],
353
+ "ʙ": [
354
+ 112
355
+ ],
356
+ "ʛ": [
357
+ 113
358
+ ],
359
+ "ʜ": [
360
+ 114
361
+ ],
362
+ "ʝ": [
363
+ 115
364
+ ],
365
+ "ʟ": [
366
+ 116
367
+ ],
368
+ "ʡ": [
369
+ 117
370
+ ],
371
+ "ʢ": [
372
+ 118
373
+ ],
374
+ "ʲ": [
375
+ 119
376
+ ],
377
+ "ˈ": [
378
+ 120
379
+ ],
380
+ "ˌ": [
381
+ 121
382
+ ],
383
+ "ː": [
384
+ 122
385
+ ],
386
+ "ˑ": [
387
+ 123
388
+ ],
389
+ "˞": [
390
+ 124
391
+ ],
392
+ "β": [
393
+ 125
394
+ ],
395
+ "θ": [
396
+ 126
397
+ ],
398
+ "χ": [
399
+ 127
400
+ ],
401
+ "ᵻ": [
402
+ 128
403
+ ],
404
+ "ⱱ": [
405
+ 129
406
+ ],
407
+ "0": [
408
+ 130
409
+ ],
410
+ "1": [
411
+ 131
412
+ ],
413
+ "2": [
414
+ 132
415
+ ],
416
+ "3": [
417
+ 133
418
+ ],
419
+ "4": [
420
+ 134
421
+ ],
422
+ "5": [
423
+ 135
424
+ ],
425
+ "6": [
426
+ 136
427
+ ],
428
+ "7": [
429
+ 137
430
+ ],
431
+ "8": [
432
+ 138
433
+ ],
434
+ "9": [
435
+ 139
436
+ ],
437
+ "̧": [
438
+ 140
439
+ ],
440
+ "̃": [
441
+ 141
442
+ ],
443
+ "̪": [
444
+ 142
445
+ ],
446
+ "̯": [
447
+ 143
448
+ ],
449
+ "̩": [
450
+ 144
451
+ ],
452
+ "ʰ": [
453
+ 145
454
+ ],
455
+ "ˤ": [
456
+ 146
457
+ ],
458
+ "ε": [
459
+ 147
460
+ ],
461
+ "↓": [
462
+ 148
463
+ ],
464
+ "#": [
465
+ 149
466
+ ],
467
+ "\"": [
468
+ 150
469
+ ],
470
+ "↑": [
471
+ 151
472
+ ],
473
+ "̺": [
474
+ 152
475
+ ],
476
+ "̻": [
477
+ 153
478
+ ],
479
+ "g": [
480
+ 154
481
+ ],
482
+ "ʦ": [
483
+ 155
484
+ ],
485
+ "X": [
486
+ 156
487
+ ],
488
+ "̝": [
489
+ 157
490
+ ],
491
+ "̊": [
492
+ 158
493
+ ],
494
+ "ɝ": [
495
+ 159
496
+ ],
497
+ "ʷ": [
498
+ 160
499
+ ],
500
+ "aɪ": [
501
+ 161
502
+ ],
503
+ "aʊ": [
504
+ 162
505
+ ],
506
+ "ɔɪ": [
507
+ 163
508
+ ],
509
+ "eɪ": [
510
+ 164
511
+ ],
512
+ "oʊ": [
513
+ 165
514
+ ]
515
+ },
516
+ "speaker_id_map": {},
517
+ "hop_length": 256,
518
+ "default_speaker_id": 0,
519
+ "piper_version": "1.5.0"
520
+ }
data/stats.csv ADDED
The diff for this file is too large to render. See raw diff
 
onnx/base_e751.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:700535014bc4c7f6738760850a4ea0be991fe140d047a6311af0336bc2861569
3
+ size 63516051
onnx/base_e751.onnx.json ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio": {
3
+ "sample_rate": 22050
4
+ },
5
+ "espeak": {
6
+ "voice": "de"
7
+ },
8
+ "phoneme_type": "espeak",
9
+ "num_symbols": 256,
10
+ "num_speakers": 1,
11
+ "inference": {
12
+ "noise_scale": 0.667,
13
+ "length_scale": 1.0,
14
+ "noise_w": 0.8
15
+ },
16
+ "phoneme_id_map": {
17
+ "_": [
18
+ 0
19
+ ],
20
+ "^": [
21
+ 1
22
+ ],
23
+ "$": [
24
+ 2
25
+ ],
26
+ " ": [
27
+ 3
28
+ ],
29
+ "!": [
30
+ 4
31
+ ],
32
+ "'": [
33
+ 5
34
+ ],
35
+ "(": [
36
+ 6
37
+ ],
38
+ ")": [
39
+ 7
40
+ ],
41
+ ",": [
42
+ 8
43
+ ],
44
+ "-": [
45
+ 9
46
+ ],
47
+ ".": [
48
+ 10
49
+ ],
50
+ ":": [
51
+ 11
52
+ ],
53
+ ";": [
54
+ 12
55
+ ],
56
+ "?": [
57
+ 13
58
+ ],
59
+ "a": [
60
+ 14
61
+ ],
62
+ "b": [
63
+ 15
64
+ ],
65
+ "c": [
66
+ 16
67
+ ],
68
+ "d": [
69
+ 17
70
+ ],
71
+ "e": [
72
+ 18
73
+ ],
74
+ "f": [
75
+ 19
76
+ ],
77
+ "h": [
78
+ 20
79
+ ],
80
+ "i": [
81
+ 21
82
+ ],
83
+ "j": [
84
+ 22
85
+ ],
86
+ "k": [
87
+ 23
88
+ ],
89
+ "l": [
90
+ 24
91
+ ],
92
+ "m": [
93
+ 25
94
+ ],
95
+ "n": [
96
+ 26
97
+ ],
98
+ "o": [
99
+ 27
100
+ ],
101
+ "p": [
102
+ 28
103
+ ],
104
+ "q": [
105
+ 29
106
+ ],
107
+ "r": [
108
+ 30
109
+ ],
110
+ "s": [
111
+ 31
112
+ ],
113
+ "t": [
114
+ 32
115
+ ],
116
+ "u": [
117
+ 33
118
+ ],
119
+ "v": [
120
+ 34
121
+ ],
122
+ "w": [
123
+ 35
124
+ ],
125
+ "x": [
126
+ 36
127
+ ],
128
+ "y": [
129
+ 37
130
+ ],
131
+ "z": [
132
+ 38
133
+ ],
134
+ "æ": [
135
+ 39
136
+ ],
137
+ "ç": [
138
+ 40
139
+ ],
140
+ "ð": [
141
+ 41
142
+ ],
143
+ "ø": [
144
+ 42
145
+ ],
146
+ "ħ": [
147
+ 43
148
+ ],
149
+ "ŋ": [
150
+ 44
151
+ ],
152
+ "œ": [
153
+ 45
154
+ ],
155
+ "ǀ": [
156
+ 46
157
+ ],
158
+ "ǁ": [
159
+ 47
160
+ ],
161
+ "ǂ": [
162
+ 48
163
+ ],
164
+ "ǃ": [
165
+ 49
166
+ ],
167
+ "ɐ": [
168
+ 50
169
+ ],
170
+ "ɑ": [
171
+ 51
172
+ ],
173
+ "ɒ": [
174
+ 52
175
+ ],
176
+ "ɓ": [
177
+ 53
178
+ ],
179
+ "ɔ": [
180
+ 54
181
+ ],
182
+ "ɕ": [
183
+ 55
184
+ ],
185
+ "ɖ": [
186
+ 56
187
+ ],
188
+ "ɗ": [
189
+ 57
190
+ ],
191
+ "ɘ": [
192
+ 58
193
+ ],
194
+ "ə": [
195
+ 59
196
+ ],
197
+ "ɚ": [
198
+ 60
199
+ ],
200
+ "ɛ": [
201
+ 61
202
+ ],
203
+ "ɜ": [
204
+ 62
205
+ ],
206
+ "ɞ": [
207
+ 63
208
+ ],
209
+ "ɟ": [
210
+ 64
211
+ ],
212
+ "ɠ": [
213
+ 65
214
+ ],
215
+ "ɡ": [
216
+ 66
217
+ ],
218
+ "ɢ": [
219
+ 67
220
+ ],
221
+ "ɣ": [
222
+ 68
223
+ ],
224
+ "ɤ": [
225
+ 69
226
+ ],
227
+ "ɥ": [
228
+ 70
229
+ ],
230
+ "ɦ": [
231
+ 71
232
+ ],
233
+ "ɧ": [
234
+ 72
235
+ ],
236
+ "ɨ": [
237
+ 73
238
+ ],
239
+ "ɪ": [
240
+ 74
241
+ ],
242
+ "ɫ": [
243
+ 75
244
+ ],
245
+ "ɬ": [
246
+ 76
247
+ ],
248
+ "ɭ": [
249
+ 77
250
+ ],
251
+ "ɮ": [
252
+ 78
253
+ ],
254
+ "ɯ": [
255
+ 79
256
+ ],
257
+ "ɰ": [
258
+ 80
259
+ ],
260
+ "ɱ": [
261
+ 81
262
+ ],
263
+ "ɲ": [
264
+ 82
265
+ ],
266
+ "ɳ": [
267
+ 83
268
+ ],
269
+ "ɴ": [
270
+ 84
271
+ ],
272
+ "ɵ": [
273
+ 85
274
+ ],
275
+ "ɶ": [
276
+ 86
277
+ ],
278
+ "ɸ": [
279
+ 87
280
+ ],
281
+ "ɹ": [
282
+ 88
283
+ ],
284
+ "ɺ": [
285
+ 89
286
+ ],
287
+ "ɻ": [
288
+ 90
289
+ ],
290
+ "ɽ": [
291
+ 91
292
+ ],
293
+ "ɾ": [
294
+ 92
295
+ ],
296
+ "ʀ": [
297
+ 93
298
+ ],
299
+ "ʁ": [
300
+ 94
301
+ ],
302
+ "ʂ": [
303
+ 95
304
+ ],
305
+ "ʃ": [
306
+ 96
307
+ ],
308
+ "ʄ": [
309
+ 97
310
+ ],
311
+ "ʈ": [
312
+ 98
313
+ ],
314
+ "ʉ": [
315
+ 99
316
+ ],
317
+ "ʊ": [
318
+ 100
319
+ ],
320
+ "ʋ": [
321
+ 101
322
+ ],
323
+ "ʌ": [
324
+ 102
325
+ ],
326
+ "ʍ": [
327
+ 103
328
+ ],
329
+ "ʎ": [
330
+ 104
331
+ ],
332
+ "ʏ": [
333
+ 105
334
+ ],
335
+ "ʐ": [
336
+ 106
337
+ ],
338
+ "ʑ": [
339
+ 107
340
+ ],
341
+ "ʒ": [
342
+ 108
343
+ ],
344
+ "ʔ": [
345
+ 109
346
+ ],
347
+ "ʕ": [
348
+ 110
349
+ ],
350
+ "ʘ": [
351
+ 111
352
+ ],
353
+ "ʙ": [
354
+ 112
355
+ ],
356
+ "ʛ": [
357
+ 113
358
+ ],
359
+ "ʜ": [
360
+ 114
361
+ ],
362
+ "ʝ": [
363
+ 115
364
+ ],
365
+ "ʟ": [
366
+ 116
367
+ ],
368
+ "ʡ": [
369
+ 117
370
+ ],
371
+ "ʢ": [
372
+ 118
373
+ ],
374
+ "ʲ": [
375
+ 119
376
+ ],
377
+ "ˈ": [
378
+ 120
379
+ ],
380
+ "ˌ": [
381
+ 121
382
+ ],
383
+ "ː": [
384
+ 122
385
+ ],
386
+ "ˑ": [
387
+ 123
388
+ ],
389
+ "˞": [
390
+ 124
391
+ ],
392
+ "β": [
393
+ 125
394
+ ],
395
+ "θ": [
396
+ 126
397
+ ],
398
+ "χ": [
399
+ 127
400
+ ],
401
+ "ᵻ": [
402
+ 128
403
+ ],
404
+ "ⱱ": [
405
+ 129
406
+ ],
407
+ "0": [
408
+ 130
409
+ ],
410
+ "1": [
411
+ 131
412
+ ],
413
+ "2": [
414
+ 132
415
+ ],
416
+ "3": [
417
+ 133
418
+ ],
419
+ "4": [
420
+ 134
421
+ ],
422
+ "5": [
423
+ 135
424
+ ],
425
+ "6": [
426
+ 136
427
+ ],
428
+ "7": [
429
+ 137
430
+ ],
431
+ "8": [
432
+ 138
433
+ ],
434
+ "9": [
435
+ 139
436
+ ],
437
+ "̧": [
438
+ 140
439
+ ],
440
+ "̃": [
441
+ 141
442
+ ],
443
+ "̪": [
444
+ 142
445
+ ],
446
+ "̯": [
447
+ 143
448
+ ],
449
+ "̩": [
450
+ 144
451
+ ],
452
+ "ʰ": [
453
+ 145
454
+ ],
455
+ "ˤ": [
456
+ 146
457
+ ],
458
+ "ε": [
459
+ 147
460
+ ],
461
+ "↓": [
462
+ 148
463
+ ],
464
+ "#": [
465
+ 149
466
+ ],
467
+ "\"": [
468
+ 150
469
+ ],
470
+ "↑": [
471
+ 151
472
+ ],
473
+ "̺": [
474
+ 152
475
+ ],
476
+ "̻": [
477
+ 153
478
+ ],
479
+ "g": [
480
+ 154
481
+ ],
482
+ "ʦ": [
483
+ 155
484
+ ],
485
+ "X": [
486
+ 156
487
+ ],
488
+ "̝": [
489
+ 157
490
+ ],
491
+ "̊": [
492
+ 158
493
+ ],
494
+ "ɝ": [
495
+ 159
496
+ ],
497
+ "ʷ": [
498
+ 160
499
+ ],
500
+ "aɪ": [
501
+ 161
502
+ ],
503
+ "aʊ": [
504
+ 162
505
+ ],
506
+ "ɔɪ": [
507
+ 163
508
+ ],
509
+ "eɪ": [
510
+ 164
511
+ ],
512
+ "oʊ": [
513
+ 165
514
+ ]
515
+ },
516
+ "speaker_id_map": {},
517
+ "hop_length": 256,
518
+ "default_speaker_id": 0,
519
+ "piper_version": "1.5.0"
520
+ }
onnx/base_e961.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea01b491b411c3a4849fc381f515644e461561c0997db03b685faf952392dd4f
3
+ size 63516051
onnx/base_e961.onnx.json ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio": {
3
+ "sample_rate": 22050
4
+ },
5
+ "espeak": {
6
+ "voice": "de"
7
+ },
8
+ "phoneme_type": "espeak",
9
+ "num_symbols": 256,
10
+ "num_speakers": 1,
11
+ "inference": {
12
+ "noise_scale": 0.667,
13
+ "length_scale": 1.0,
14
+ "noise_w": 0.8
15
+ },
16
+ "phoneme_id_map": {
17
+ "_": [
18
+ 0
19
+ ],
20
+ "^": [
21
+ 1
22
+ ],
23
+ "$": [
24
+ 2
25
+ ],
26
+ " ": [
27
+ 3
28
+ ],
29
+ "!": [
30
+ 4
31
+ ],
32
+ "'": [
33
+ 5
34
+ ],
35
+ "(": [
36
+ 6
37
+ ],
38
+ ")": [
39
+ 7
40
+ ],
41
+ ",": [
42
+ 8
43
+ ],
44
+ "-": [
45
+ 9
46
+ ],
47
+ ".": [
48
+ 10
49
+ ],
50
+ ":": [
51
+ 11
52
+ ],
53
+ ";": [
54
+ 12
55
+ ],
56
+ "?": [
57
+ 13
58
+ ],
59
+ "a": [
60
+ 14
61
+ ],
62
+ "b": [
63
+ 15
64
+ ],
65
+ "c": [
66
+ 16
67
+ ],
68
+ "d": [
69
+ 17
70
+ ],
71
+ "e": [
72
+ 18
73
+ ],
74
+ "f": [
75
+ 19
76
+ ],
77
+ "h": [
78
+ 20
79
+ ],
80
+ "i": [
81
+ 21
82
+ ],
83
+ "j": [
84
+ 22
85
+ ],
86
+ "k": [
87
+ 23
88
+ ],
89
+ "l": [
90
+ 24
91
+ ],
92
+ "m": [
93
+ 25
94
+ ],
95
+ "n": [
96
+ 26
97
+ ],
98
+ "o": [
99
+ 27
100
+ ],
101
+ "p": [
102
+ 28
103
+ ],
104
+ "q": [
105
+ 29
106
+ ],
107
+ "r": [
108
+ 30
109
+ ],
110
+ "s": [
111
+ 31
112
+ ],
113
+ "t": [
114
+ 32
115
+ ],
116
+ "u": [
117
+ 33
118
+ ],
119
+ "v": [
120
+ 34
121
+ ],
122
+ "w": [
123
+ 35
124
+ ],
125
+ "x": [
126
+ 36
127
+ ],
128
+ "y": [
129
+ 37
130
+ ],
131
+ "z": [
132
+ 38
133
+ ],
134
+ "æ": [
135
+ 39
136
+ ],
137
+ "ç": [
138
+ 40
139
+ ],
140
+ "ð": [
141
+ 41
142
+ ],
143
+ "ø": [
144
+ 42
145
+ ],
146
+ "ħ": [
147
+ 43
148
+ ],
149
+ "ŋ": [
150
+ 44
151
+ ],
152
+ "œ": [
153
+ 45
154
+ ],
155
+ "ǀ": [
156
+ 46
157
+ ],
158
+ "ǁ": [
159
+ 47
160
+ ],
161
+ "ǂ": [
162
+ 48
163
+ ],
164
+ "ǃ": [
165
+ 49
166
+ ],
167
+ "ɐ": [
168
+ 50
169
+ ],
170
+ "ɑ": [
171
+ 51
172
+ ],
173
+ "ɒ": [
174
+ 52
175
+ ],
176
+ "ɓ": [
177
+ 53
178
+ ],
179
+ "ɔ": [
180
+ 54
181
+ ],
182
+ "ɕ": [
183
+ 55
184
+ ],
185
+ "ɖ": [
186
+ 56
187
+ ],
188
+ "ɗ": [
189
+ 57
190
+ ],
191
+ "ɘ": [
192
+ 58
193
+ ],
194
+ "ə": [
195
+ 59
196
+ ],
197
+ "ɚ": [
198
+ 60
199
+ ],
200
+ "ɛ": [
201
+ 61
202
+ ],
203
+ "ɜ": [
204
+ 62
205
+ ],
206
+ "ɞ": [
207
+ 63
208
+ ],
209
+ "ɟ": [
210
+ 64
211
+ ],
212
+ "ɠ": [
213
+ 65
214
+ ],
215
+ "ɡ": [
216
+ 66
217
+ ],
218
+ "ɢ": [
219
+ 67
220
+ ],
221
+ "ɣ": [
222
+ 68
223
+ ],
224
+ "ɤ": [
225
+ 69
226
+ ],
227
+ "ɥ": [
228
+ 70
229
+ ],
230
+ "ɦ": [
231
+ 71
232
+ ],
233
+ "ɧ": [
234
+ 72
235
+ ],
236
+ "ɨ": [
237
+ 73
238
+ ],
239
+ "ɪ": [
240
+ 74
241
+ ],
242
+ "ɫ": [
243
+ 75
244
+ ],
245
+ "ɬ": [
246
+ 76
247
+ ],
248
+ "ɭ": [
249
+ 77
250
+ ],
251
+ "ɮ": [
252
+ 78
253
+ ],
254
+ "ɯ": [
255
+ 79
256
+ ],
257
+ "ɰ": [
258
+ 80
259
+ ],
260
+ "ɱ": [
261
+ 81
262
+ ],
263
+ "ɲ": [
264
+ 82
265
+ ],
266
+ "ɳ": [
267
+ 83
268
+ ],
269
+ "ɴ": [
270
+ 84
271
+ ],
272
+ "ɵ": [
273
+ 85
274
+ ],
275
+ "ɶ": [
276
+ 86
277
+ ],
278
+ "ɸ": [
279
+ 87
280
+ ],
281
+ "ɹ": [
282
+ 88
283
+ ],
284
+ "ɺ": [
285
+ 89
286
+ ],
287
+ "ɻ": [
288
+ 90
289
+ ],
290
+ "ɽ": [
291
+ 91
292
+ ],
293
+ "ɾ": [
294
+ 92
295
+ ],
296
+ "ʀ": [
297
+ 93
298
+ ],
299
+ "ʁ": [
300
+ 94
301
+ ],
302
+ "ʂ": [
303
+ 95
304
+ ],
305
+ "ʃ": [
306
+ 96
307
+ ],
308
+ "ʄ": [
309
+ 97
310
+ ],
311
+ "ʈ": [
312
+ 98
313
+ ],
314
+ "ʉ": [
315
+ 99
316
+ ],
317
+ "ʊ": [
318
+ 100
319
+ ],
320
+ "ʋ": [
321
+ 101
322
+ ],
323
+ "ʌ": [
324
+ 102
325
+ ],
326
+ "ʍ": [
327
+ 103
328
+ ],
329
+ "ʎ": [
330
+ 104
331
+ ],
332
+ "ʏ": [
333
+ 105
334
+ ],
335
+ "ʐ": [
336
+ 106
337
+ ],
338
+ "ʑ": [
339
+ 107
340
+ ],
341
+ "ʒ": [
342
+ 108
343
+ ],
344
+ "ʔ": [
345
+ 109
346
+ ],
347
+ "ʕ": [
348
+ 110
349
+ ],
350
+ "ʘ": [
351
+ 111
352
+ ],
353
+ "ʙ": [
354
+ 112
355
+ ],
356
+ "ʛ": [
357
+ 113
358
+ ],
359
+ "ʜ": [
360
+ 114
361
+ ],
362
+ "ʝ": [
363
+ 115
364
+ ],
365
+ "ʟ": [
366
+ 116
367
+ ],
368
+ "ʡ": [
369
+ 117
370
+ ],
371
+ "ʢ": [
372
+ 118
373
+ ],
374
+ "ʲ": [
375
+ 119
376
+ ],
377
+ "ˈ": [
378
+ 120
379
+ ],
380
+ "ˌ": [
381
+ 121
382
+ ],
383
+ "ː": [
384
+ 122
385
+ ],
386
+ "ˑ": [
387
+ 123
388
+ ],
389
+ "˞": [
390
+ 124
391
+ ],
392
+ "β": [
393
+ 125
394
+ ],
395
+ "θ": [
396
+ 126
397
+ ],
398
+ "χ": [
399
+ 127
400
+ ],
401
+ "ᵻ": [
402
+ 128
403
+ ],
404
+ "ⱱ": [
405
+ 129
406
+ ],
407
+ "0": [
408
+ 130
409
+ ],
410
+ "1": [
411
+ 131
412
+ ],
413
+ "2": [
414
+ 132
415
+ ],
416
+ "3": [
417
+ 133
418
+ ],
419
+ "4": [
420
+ 134
421
+ ],
422
+ "5": [
423
+ 135
424
+ ],
425
+ "6": [
426
+ 136
427
+ ],
428
+ "7": [
429
+ 137
430
+ ],
431
+ "8": [
432
+ 138
433
+ ],
434
+ "9": [
435
+ 139
436
+ ],
437
+ "̧": [
438
+ 140
439
+ ],
440
+ "̃": [
441
+ 141
442
+ ],
443
+ "̪": [
444
+ 142
445
+ ],
446
+ "̯": [
447
+ 143
448
+ ],
449
+ "̩": [
450
+ 144
451
+ ],
452
+ "ʰ": [
453
+ 145
454
+ ],
455
+ "ˤ": [
456
+ 146
457
+ ],
458
+ "ε": [
459
+ 147
460
+ ],
461
+ "↓": [
462
+ 148
463
+ ],
464
+ "#": [
465
+ 149
466
+ ],
467
+ "\"": [
468
+ 150
469
+ ],
470
+ "↑": [
471
+ 151
472
+ ],
473
+ "̺": [
474
+ 152
475
+ ],
476
+ "̻": [
477
+ 153
478
+ ],
479
+ "g": [
480
+ 154
481
+ ],
482
+ "ʦ": [
483
+ 155
484
+ ],
485
+ "X": [
486
+ 156
487
+ ],
488
+ "̝": [
489
+ 157
490
+ ],
491
+ "̊": [
492
+ 158
493
+ ],
494
+ "ɝ": [
495
+ 159
496
+ ],
497
+ "ʷ": [
498
+ 160
499
+ ],
500
+ "aɪ": [
501
+ 161
502
+ ],
503
+ "aʊ": [
504
+ 162
505
+ ],
506
+ "ɔɪ": [
507
+ 163
508
+ ],
509
+ "eɪ": [
510
+ 164
511
+ ],
512
+ "oʊ": [
513
+ 165
514
+ ]
515
+ },
516
+ "speaker_id_map": {},
517
+ "hop_length": 256,
518
+ "default_speaker_id": 0,
519
+ "piper_version": "1.5.0"
520
+ }
prep_tv44k_piper.py ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Thorsten-Voice/TV-44kHz-Full -> Trainingsdaten für piper1-gpl (22.050 Hz, mono, PCM16).
4
+
5
+ Schritt 1 (Schema prüfen, nichts wird geschrieben):
6
+ python prep_tv44k_piper.py --inspect
7
+
8
+ Schritt 2 (Aufbereitung):
9
+ python prep_tv44k_piper.py --out ./tv_base \
10
+ --text-col text --style-col style --subset-col subset
11
+
12
+ Abhängigkeiten: pip install datasets soundfile soxr librosa pyloudnorm
13
+ Audio wird bewusst mit decode=False geladen und selbst dekodiert
14
+ (neuere `datasets`-Versionen wollen sonst torchcodec).
15
+ """
16
+ import argparse, csv, io, os, re, sys
17
+ from collections import Counter, defaultdict
18
+ from pathlib import Path
19
+
20
+ import numpy as np
21
+ import soundfile as sf
22
+ import soxr
23
+ import librosa
24
+ import pyloudnorm as pyln
25
+ from datasets import Audio, get_dataset_config_names, get_dataset_split_names, load_dataset
26
+
27
+ REPO = "Thorsten-Voice/TV-44kHz-Full"
28
+ SUBSETS = ["TV-2021.02-Neutral", "TV-2021.06-Emotional", "TV-2022.10-Neutral"]
29
+ TARGET_SR = 22050
30
+ # Stile, die für eine neutrale Basis eher schaden (Teilstring, case-insensitive)
31
+ DEFAULT_EXCLUDE_STYLES = ["whisper", "flüster", "drunk", "betrunken", "sleepy", "schläfrig"]
32
+
33
+
34
+ def inspect():
35
+ print("Configs:", get_dataset_config_names(REPO))
36
+ for cfg in get_dataset_config_names(REPO):
37
+ print(f"\n== {cfg} == Splits:", get_dataset_split_names(REPO, cfg))
38
+ ds = load_dataset(REPO, cfg, split="train", streaming=True)
39
+ print("Features:", ds.features)
40
+ audio_cols = [k for k, f in (ds.features or {}).items() if isinstance(f, Audio)]
41
+ for col in audio_cols:
42
+ ds = ds.cast_column(col, Audio(decode=False))
43
+ ex = next(iter(ds))
44
+ print("Beispiel:", {k: ("<audio>" if k in audio_cols else v) for k, v in ex.items()})
45
+ if audio_cols:
46
+ y, sr = read_audio(ex[audio_cols[0]])
47
+ print(f"Audio: {sr} Hz, {len(y) / sr:.2f} s")
48
+ sys.stdout.flush()
49
+ os._exit(0) # vermeidet den harmlosen GIL-Absturz der Streaming-Threads beim Beenden
50
+
51
+
52
+ def load_subset(subset, a):
53
+ configs = get_dataset_config_names(REPO)
54
+ if subset in configs:
55
+ ds = load_dataset(REPO, subset, split=a.split)
56
+ else:
57
+ ds = load_dataset(REPO, split=a.split)
58
+ ds = ds.filter(lambda s: str(s) == subset, input_columns=[a.subset_col])
59
+ return ds.cast_column(a.audio_col, Audio(decode=False))
60
+
61
+
62
+ def read_audio(aud):
63
+ src = io.BytesIO(aud["bytes"]) if aud.get("bytes") else aud["path"]
64
+ y, sr = sf.read(src, dtype="float32", always_2d=True)
65
+ return y.mean(axis=1), sr
66
+
67
+
68
+ def clean_text(t):
69
+ t = str(t).replace("|", ",")
70
+ return re.sub(r"\s+", " ", t).strip()
71
+
72
+
73
+ def main():
74
+ p = argparse.ArgumentParser()
75
+ p.add_argument("--inspect", action="store_true")
76
+ p.add_argument("--out", type=Path)
77
+ p.add_argument("--subsets", nargs="+", default=SUBSETS)
78
+ p.add_argument("--split", default="train")
79
+ p.add_argument("--audio-col", default="audio")
80
+ p.add_argument("--text-col", default="text")
81
+ p.add_argument("--style-col", default="style", help="Spalte mit Sprechstil/Emotion")
82
+ p.add_argument("--mic-col", default="microphone", help="Spalte mit Mikrofon/Aufnahme-Setup")
83
+ p.add_argument("--comment-col", default="comment")
84
+ p.add_argument("--keep-commented", action="store_true",
85
+ help="Einträge mit Kommentar (z. B. 'end might be cut off early') behalten")
86
+ p.add_argument("--subset-col", default="subset", help="nur nötig, wenn Subsets keine Configs sind")
87
+ p.add_argument("--id-col", default="id", help="Original-ID, landet nur in stats.csv")
88
+ p.add_argument("--exclude-styles", nargs="*", default=DEFAULT_EXCLUDE_STYLES)
89
+ p.add_argument("--exclude-mics", nargs="*", default=[])
90
+ p.add_argument("--min-dur", type=float, default=0.8)
91
+ p.add_argument("--max-dur", type=float, default=15.0)
92
+ p.add_argument("--min-cps", type=float, default=6.0, help="Zeichen/Sekunde (nach Trim)")
93
+ p.add_argument("--max-cps", type=float, default=25.0)
94
+ p.add_argument("--target-lufs", type=float, default=-23.0)
95
+ p.add_argument("--trim-db", type=float, default=40.0)
96
+ p.add_argument("--pad", type=float, default=0.15, help="Stille vorn/hinten in s nach Trim")
97
+ a = p.parse_args()
98
+
99
+ if a.inspect:
100
+ inspect(); return
101
+ if not a.out:
102
+ sys.exit("--out fehlt")
103
+
104
+ wav_dir = a.out / "wavs"
105
+ wav_dir.mkdir(parents=True, exist_ok=True)
106
+ rejected = Counter()
107
+ hours = defaultdict(float)
108
+ rows, stats = [], []
109
+
110
+ for subset in a.subsets:
111
+ tag = re.sub(r"[^0-9A-Za-z]+", "", subset).lower()
112
+ ds = load_subset(subset, a)
113
+ print(f"{subset}: {len(ds)} Einträge")
114
+ for i, ex in enumerate(ds):
115
+ text = clean_text(ex[a.text_col])
116
+ style = str(ex.get(a.style_col, "")) if a.style_col else ""
117
+ mic = str(ex.get(a.mic_col, "")) if a.mic_col else ""
118
+ if not text:
119
+ rejected["leerer Text"] += 1; continue
120
+ if style and any(s in style.lower() for s in a.exclude_styles):
121
+ rejected[f"Stil:{style}"] += 1; continue
122
+ if mic and any(m.lower() in mic.lower() for m in a.exclude_mics):
123
+ rejected[f"Mikro:{mic}"] += 1; continue
124
+ comment = str(ex.get(a.comment_col) or "").strip() if a.comment_col else ""
125
+ if comment and not a.keep_commented:
126
+ rejected[f"Kommentar:{comment}"] += 1; continue
127
+
128
+ y, sr = read_audio(ex[a.audio_col])
129
+ if np.mean(np.abs(y) > 0.999) > 1e-3:
130
+ rejected["Clipping"] += 1; continue
131
+
132
+ y, _ = librosa.effects.trim(y, top_db=a.trim_db)
133
+ dur = len(y) / sr
134
+ if not (a.min_dur <= dur <= a.max_dur):
135
+ rejected["Dauer"] += 1; continue
136
+ cps = len(text) / dur
137
+ if not (a.min_cps <= cps <= a.max_cps):
138
+ rejected["Zeichen/s (Text-Audio-Mismatch?)"] += 1; continue
139
+
140
+ loud = pyln.Meter(sr).integrated_loudness(y)
141
+ if np.isfinite(loud):
142
+ y = pyln.normalize.loudness(y, loud, a.target_lufs)
143
+ y = soxr.resample(y, sr, TARGET_SR, quality="VHQ")
144
+ pad = np.zeros(int(a.pad * TARGET_SR), dtype=np.float32)
145
+ y = np.concatenate([pad, y, pad])
146
+ peak = np.max(np.abs(y))
147
+ if peak > 0.89: # ca. -1 dBFS
148
+ y = y * (0.89 / peak)
149
+
150
+ uid = f"{tag}_{i:06d}"
151
+ sf.write(wav_dir / f"{uid}.wav", y, TARGET_SR, subtype="PCM_16")
152
+ rows.append((f"{uid}.wav", text))
153
+ orig_id = ex.get(a.id_col, "") if a.id_col else ""
154
+ stats.append((uid, orig_id, subset, style, mic, comment, f"{dur:.2f}", f"{cps:.1f}"))
155
+ hours[subset] += dur / 3600
156
+
157
+ with open(a.out / "metadata.csv", "w", encoding="utf-8", newline="") as f:
158
+ csv.writer(f, delimiter="|", quoting=csv.QUOTE_NONE, escapechar="\\").writerows(rows)
159
+ with open(a.out / "stats.csv", "w", encoding="utf-8", newline="") as f:
160
+ w = csv.writer(f)
161
+ w.writerow(["id", "orig_id", "subset", "style", "mic", "comment", "dur_s", "cps"])
162
+ w.writerows(stats)
163
+
164
+ print(f"\n{len(rows)} Utterances geschrieben, {sum(hours.values()):.1f} h gesamt")
165
+ for s, h in hours.items():
166
+ print(f" {s}: {h:.1f} h")
167
+ print("Verworfen:")
168
+ for r, n in rejected.most_common():
169
+ print(f" {r}: {n}")
170
+
171
+
172
+ if __name__ == "__main__":
173
+ main()
runs/events.out.tfevents.piper-base ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38db8058c3f7fe4911399281f9caa35e79ab95ee1c0fed27a857787f5cb89c46
3
+ size 10590148
runs/hparams.yaml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _instantiator: lightning.pytorch.cli.instantiate_module
2
+ batch_size: 32
3
+ betas:
4
+ - 0.8
5
+ - 0.99
6
+ betas_d:
7
+ - 0.5
8
+ - 0.9
9
+ c_kl: 1.0
10
+ c_mel: 45
11
+ dataset: null
12
+ eps: 1.0e-09
13
+ filter_channels: 768
14
+ filter_length: 1024
15
+ gin_channels: 0
16
+ grad_clip: null
17
+ hidden_channels: 192
18
+ hop_length: 256
19
+ init_lr_ratio: 1.0
20
+ inter_channels: 192
21
+ kernel_size: 3
22
+ learning_rate: 0.0002
23
+ learning_rate_d: 0.0001
24
+ lr_decay: null
25
+ lr_decay_d: null
26
+ lr_final_ratio: 0.05
27
+ mel_channels: 80
28
+ mel_fmax: null
29
+ mel_fmin: 0.0
30
+ mos_metric: utmos
31
+ n_heads: 2
32
+ n_layers: 6
33
+ n_layers_q: 3
34
+ num_speakers: 1
35
+ num_symbols: 256
36
+ p_dropout: 0.1
37
+ resblock: '2'
38
+ resblock_dilation_sizes:
39
+ - - 1
40
+ - 2
41
+ - - 2
42
+ - 6
43
+ - - 3
44
+ - 12
45
+ resblock_kernel_sizes:
46
+ - 3
47
+ - 5
48
+ - 7
49
+ sample_rate: 22050
50
+ segment_size: 8192
51
+ upsample_initial_channel: 256
52
+ upsample_kernel_sizes:
53
+ - 16
54
+ - 16
55
+ - 8
56
+ upsample_rates:
57
+ - 8
58
+ - 8
59
+ - 4
60
+ use_mrd: false
61
+ use_sdp: true
62
+ use_spectral_norm: false
63
+ vocoder_warmstart_ckpt: null
64
+ warmstart_ckpt: ./runs/lightning_logs/version_0/checkpoints/epoch=1799-val_mel=0.3751.ckpt
65
+ warmup_epochs: 0
66
+ win_length: 1024
samples/absatz.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Es ist ein ruhiger Herbstabend am Rand einer kleinen Stadt. Über den Feldern liegt leichter Nebel, und irgendwo in der Ferne bellt ein Hund. Im Arbeitszimmer brummt leise ein Server, der seit Tagen geduldig rechnet. Wie viele Stunden Sprachaufnahmen braucht eine künstliche Stimme eigentlich, um wirklich natürlich zu klingen? Zehn, zwanzig oder vielleicht dreißig? Die ehrliche Antwort lautet: Es kommt darauf an. Entscheidend ist nicht nur die Menge, sondern auch die Qualität und die Vielfalt der Sätze. Ein gutes Sprachmodell muss lange Schachtelsätze ebenso sicher meistern wie kurze Fragen, Zahlen wie dreihundertvierundzwanzig, Fremdwörter wie Smartphone oder Restaurant und knifflige Begriffe wie Streichholzschächtelchen. Und manchmal scheitert es trotzdem an einem einzigen Wort. Genau deshalb hören wir genau hin, vergleichen geduldig und freuen uns über jeden kleinen Fortschritt.
samples/base_e751/absatz.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82c4b116eacbc5fd1e630353a8da10254eeeb975c7e84f10d4cbe390c4e0d0f0
3
+ size 2476076
samples/base_e751/testsaetze/01.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e780f7e2e57a50d74527d3053c3bdcfbba87f44f2f74b38b8239ea0fc81a4fc
3
+ size 195116
samples/base_e751/testsaetze/02.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82814d4d8a27bf89fd0b6be0d141d2dac4d716b137930229033c67ac64a02b35
3
+ size 144940
samples/base_e751/testsaetze/03.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beaf77f39466ebc738a122e3fc138e2005838d4058e445dd503569c5fc03fbce
3
+ size 125996
samples/base_e751/testsaetze/04.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36676fc269203b03fe70f3bee7b5cea3b87eef59a6cc357b65f9da7ef6a51854
3
+ size 210988
samples/base_e751/testsaetze/05.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03623bdbf2009537e05962a5ba534978a9ce37edfbad87c2c1ccdce4f491081e
3
+ size 213548
samples/base_e751/testsaetze/06.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8107faf995a4ba7efe986253068d5c618b83cb9314910070f693ec5205ecc94a
3
+ size 175148
samples/base_e751/testsaetze/07.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8eaa591a50d364c6e081a304904463f45536eb9c1ae8e8a5f196dc76f3b2aa14
3
+ size 218668
samples/base_e751/testsaetze/08.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb19dc3192e9f286ad22bd1257606c09d9d6d8cba6172b0c227cfe0ad3db936a
3
+ size 173612
samples/base_e751/testsaetze/09.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a291d86c32c26864fc7105067080da8c8b7224b91ef6fe0d3e709d1407bfd9e5
3
+ size 170540
samples/base_e751/testsaetze/10.wav ADDED
Binary file (92.2 kB). View file
 
samples/base_e751/testsaetze/11.wav ADDED
Binary file (89.1 kB). View file
 
samples/base_e751/testsaetze/12.wav ADDED
Binary file (65.1 kB). View file
 
samples/base_e751/testsaetze/13.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f563476ed06ecc9ff127b64d192d1325b248da19fd77b344f25d704a6d126134
3
+ size 187436
samples/base_e751/testsaetze/14.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50313dd5826a558ea74ba081ca879936bff702ebc698e6b9d48f4b289c388966
3
+ size 157740
samples/base_e751/testsaetze/15.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07588c77d939de3b084c2ae1a03150b9cfa9b31efca15c1baed61e4f68914f0a
3
+ size 159788
samples/base_e751/testsaetze/16.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ba2dfc3a807a8a2d73fbea84a51999e34e76f3567326bad5e72dec78c0bf634
3
+ size 134188
samples/base_e751/testsaetze/17.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1611e8d3d02437f91befb6143a78ee01e3c1494c520c5edde1e3188a346ed5b4
3
+ size 152108
samples/base_e751/testsaetze/18.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41c6e5cea1fd78ada48deb003b02c02a56abac7079d793a39c83b17473c1e9ec
3
+ size 168492
samples/base_e751/testsaetze/19.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ca88e2d2231cfe357b858ca729ff6e694370bd5fe6387fa0e3d8c264f21291e
3
+ size 153644
samples/base_e751/testsaetze/20.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a582111a9dcd85c956dd5f9bc9c68512a3f8579b19e5bd8331d1cfaea5e05656
3
+ size 181292
samples/base_e961/absatz.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84204b163b40878f8cdb89d55f3181f20e0f014b2471917704f1037177156042
3
+ size 2554924
samples/base_e961/testsaetze/01.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b855c574e0660c09881ce742e9468ab6a818f15f77e6a63dc332a9ed82fd5cb
3
+ size 195116
samples/base_e961/testsaetze/02.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d90b1e444e0ed5999706ba5f91fc5993226d6a617882baac9cfa16974699f41a
3
+ size 141868
samples/base_e961/testsaetze/03.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c28003cfa8e04ebbe622da47e356a0c72eeeee58b99cab46055f93251afe105
3
+ size 127532
samples/base_e961/testsaetze/04.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb377f9caff09513730a02bf46d0e2760c8c0abfa6fa8ccca10801a889719d13
3
+ size 214060
samples/base_e961/testsaetze/05.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2a69fc03f0008bc414198ad4c3c7fa1c5f6d32f44855ffd29e131a77ecf5a8b
3
+ size 216108
samples/base_e961/testsaetze/06.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d87874a49704f72dcddbc434760038f720bd5d90d2cb02799333fb47da7d77b8
3
+ size 180780
samples/base_e961/testsaetze/07.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7306ee2f124335f7cba570c35705c19c39d322ed87438a219eb196665fd6a7fb
3
+ size 207916
samples/base_e961/testsaetze/08.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03f0c4918e4ffb4846bca016c5530b6221951a752b954adaf6421bf627ebfc67
3
+ size 179756
samples/base_e961/testsaetze/09.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:231ba5825e85ee88935fe5e1c67a7aa87c49100b161ff8cb0d12dc4bc80286d6
3
+ size 168492
samples/base_e961/testsaetze/10.wav ADDED
Binary file (88.1 kB). View file
 
samples/base_e961/testsaetze/11.wav ADDED
Binary file (88.6 kB). View file
 
samples/base_e961/testsaetze/12.wav ADDED
Binary file (65.6 kB). View file
 
samples/base_e961/testsaetze/13.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76e546a5db96aa84d81fa4858f151de7c43e1795e050ba497a1f8df801e44b0a
3
+ size 192044
samples/base_e961/testsaetze/14.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d28885d9c362fb4a12c5fe9c497430afe330cc9f91d88654bbf02725fadcea92
3
+ size 156716