Joeyfully commited on
Commit
24912e5
·
verified ·
1 Parent(s): f805696

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -102
README.md CHANGED
@@ -1,102 +1,102 @@
1
- # Radio TTS Quick Start
2
-
3
- This workspace fine-tunes a text-to-speech model on the dataset in `data/` and writes all outputs to `output/`.
4
-
5
- ## What you get
6
-
7
- - `train.py` for training and automatic checkpoint saving
8
- - `eval.py` for synthesizing one WAV file from text
9
- - `output/model/` for saved model checkpoints
10
- - `output/rollout/` for per-epoch audio samples
11
- - `loss.csv` and `loss.png` in the project root for loss tracking
12
-
13
- ## Requirements
14
-
15
- You need Python with these packages available:
16
-
17
- - `torch`
18
- - `torchaudio`
19
- - `transformers`
20
- - `datasets`
21
- - `pandas`
22
- - `soundfile`
23
- - `matplotlib`
24
-
25
- The first run will also download the pretrained SpeechT5 model and vocoder from Hugging Face.
26
-
27
- ## Data layout
28
-
29
- The dataset should stay in the provided structure:
30
-
31
- ```text
32
- data/
33
- train-00000-of-00010.parquet
34
- train-00001-of-00010.parquet
35
- ...
36
- ```
37
-
38
- The dataset metadata is described in `dataset_README.md`.
39
-
40
- ## Train
41
-
42
- Start training with the default settings:
43
-
44
- ```bash
45
- python train.py
46
- ```
47
-
48
- Recommended first run on Windows:
49
-
50
- ```bash
51
- python train.py --epochs 1 --batch-size 2
52
- ```
53
-
54
- Useful options:
55
-
56
- - `--max-examples` limits the dataset for a quick smoke test
57
- - `--sample-text` adds custom rollout prompts and may be passed multiple times
58
- - `--output-dir` changes where checkpoints and samples are written
59
-
60
- ## Resume training
61
-
62
- Training resumes automatically from the latest checkpoint in `output/model/` when one exists.
63
-
64
- To force a fresh run, use:
65
-
66
- ```bash
67
- python train.py --no-resume
68
- ```
69
-
70
- ## Outputs after each epoch
71
-
72
- Each epoch writes:
73
-
74
- - `output/model/epoch_XXXX/` for the checkpoint
75
- - `output/rollout/epoch_XXXX/` for generated audio samples
76
- - `loss.csv` and `loss.png` updated in the project root
77
- - `output/model/last_checkpoint.txt` pointing to the most recent checkpoint
78
-
79
- ## Evaluate
80
-
81
- Generate a WAV file from text:
82
-
83
- ```bash
84
- python eval.py --text "Hello, this is a test."
85
- ```
86
-
87
- The output is written to `output/eval/`.
88
-
89
- ## Long text
90
-
91
- `eval.py` supports long text by splitting the input into chunks, re-encoding each chunk through the tokenizer, generating audio chunk by chunk, and stitching the result into one WAV file.
92
-
93
- If you want to tune long-form generation, try:
94
-
95
- ```bash
96
- python eval.py --text "your long text" --chunk-token-limit 480 --chunk-gap-seconds 0.05 --maxlenratio 60
97
- ```
98
-
99
- ## Notes
100
-
101
- - The scripts use the pretrained `microsoft/speecht5_tts` model and `microsoft/speecht5_hifigan` vocoder by default.
102
- - The dataset README says attribution is required when using the generated voice in interfaces that generate audio in response to user action. Refer to the voice as Jenny, and where practical, Jenny (Dioco).
 
1
+ # Radio TTS Quick Start
2
+
3
+ This workspace fine-tunes a text-to-speech model on the dataset in `data/` and writes all outputs to `output/`. The training and testing scripts are available at https://github.com/Lambchem/Voice-Generation
4
+
5
+ ## What you get
6
+
7
+ - `train.py` for training and automatic checkpoint saving
8
+ - `eval.py` for synthesizing one WAV file from text
9
+ - `output/model/` for saved model checkpoints
10
+ - `output/rollout/` for per-epoch audio samples
11
+ - `loss.csv` and `loss.png` in the project root for loss tracking
12
+
13
+ ## Requirements
14
+
15
+ You need Python with these packages available:
16
+
17
+ - `torch`
18
+ - `torchaudio`
19
+ - `transformers`
20
+ - `datasets`
21
+ - `pandas`
22
+ - `soundfile`
23
+ - `matplotlib`
24
+
25
+ The first run will also download the pretrained SpeechT5 model and vocoder from Hugging Face.
26
+
27
+ ## Data layout
28
+
29
+ The dataset should stay in the provided structure:
30
+
31
+ ```text
32
+ data/
33
+ train-00000-of-00010.parquet
34
+ train-00001-of-00010.parquet
35
+ ...
36
+ ```
37
+
38
+ The dataset metadata is described in `dataset_README.md`.
39
+
40
+ ## Train
41
+
42
+ Start training with the default settings:
43
+
44
+ ```bash
45
+ python train.py
46
+ ```
47
+
48
+ Recommended first run on Windows:
49
+
50
+ ```bash
51
+ python train.py --epochs 1 --batch-size 2
52
+ ```
53
+
54
+ Useful options:
55
+
56
+ - `--max-examples` limits the dataset for a quick smoke test
57
+ - `--sample-text` adds custom rollout prompts and may be passed multiple times
58
+ - `--output-dir` changes where checkpoints and samples are written
59
+
60
+ ## Resume training
61
+
62
+ Training resumes automatically from the latest checkpoint in `output/model/` when one exists.
63
+
64
+ To force a fresh run, use:
65
+
66
+ ```bash
67
+ python train.py --no-resume
68
+ ```
69
+
70
+ ## Outputs after each epoch
71
+
72
+ Each epoch writes:
73
+
74
+ - `output/model/epoch_XXXX/` for the checkpoint
75
+ - `output/rollout/epoch_XXXX/` for generated audio samples
76
+ - `loss.csv` and `loss.png` updated in the project root
77
+ - `output/model/last_checkpoint.txt` pointing to the most recent checkpoint
78
+
79
+ ## Evaluate
80
+
81
+ Generate a WAV file from text:
82
+
83
+ ```bash
84
+ python eval.py --text "Hello, this is a test."
85
+ ```
86
+
87
+ The output is written to `output/eval/`.
88
+
89
+ ## Long text
90
+
91
+ `eval.py` supports long text by splitting the input into chunks, re-encoding each chunk through the tokenizer, generating audio chunk by chunk, and stitching the result into one WAV file.
92
+
93
+ If you want to tune long-form generation, try:
94
+
95
+ ```bash
96
+ python eval.py --text "your long text" --chunk-token-limit 480 --chunk-gap-seconds 0.05 --maxlenratio 60
97
+ ```
98
+
99
+ ## Notes
100
+
101
+ - The scripts use the pretrained `microsoft/speecht5_tts` model and `microsoft/speecht5_hifigan` vocoder by default.
102
+ - The dataset README says attribution is required when using the generated voice in interfaces that generate audio in response to user action. Refer to the voice as Jenny, and where practical, Jenny (Dioco).