voidful commited on
Commit
78b3cbe
·
verified ·
1 Parent(s): 63e7bc2

Restore centroid demo artifacts

Browse files

Restore small checkpoint centroid demo artifacts and document centroid-only demo usage. No training data, optimizer state, scheduler state, logs, generated samples, or local configs are added.

README.md CHANGED
@@ -85,6 +85,33 @@ to synthesize. Reference clips should be at least 3 seconds. The
85
  speaker-reference-audio-only mode uses the raw reference-audio token path and
86
  does not require a reference transcript.
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  ## Long Text
89
 
90
  For long-form synthesis, split text into sentence-sized chunks and concatenate
@@ -127,4 +154,5 @@ Long-form diagnostics on the selected checkpoint:
127
  - `audiovae.pth`: AudioVAE weights.
128
  - `config.json`: BlueMagpie architecture/runtime config.
129
  - `tokenizer.json`, `tokenizer_config.json`: tokenizer files.
 
130
  - `USAGE.md`: expanded usage guide.
 
85
  speaker-reference-audio-only mode uses the raw reference-audio token path and
86
  does not require a reference transcript.
87
 
88
+ ## Centroid Demo
89
+
90
+ This repository keeps two small centroid demo artifacts under `checkpoints/` so
91
+ users can test the `centroid-only` path without building a centroid table first:
92
+
93
+ - `checkpoints/hung_yi_lee_speaker_centroids.pt`
94
+ - `checkpoints/speaker_centroids.pt`
95
+
96
+ These files are demo speaker-conditioning artifacts only. They are not training
97
+ data, optimizer state, scheduler state, logs, generated samples, or a complete
98
+ speaker registry.
99
+
100
+ ```python
101
+ import torch
102
+
103
+ table = torch.load("checkpoints/speaker_centroids.pt", map_location="cpu")
104
+ speaker_ids = table["speaker_ids"]
105
+ centroids = table["centroids"]
106
+
107
+ audio = model.generate(
108
+ target_text="這是 centroid-only 的測試。",
109
+ speaker_centroid=centroids[0],
110
+ cfg_value=2.0,
111
+ inference_timesteps=10,
112
+ )
113
+ ```
114
+
115
  ## Long Text
116
 
117
  For long-form synthesis, split text into sentence-sized chunks and concatenate
 
154
  - `audiovae.pth`: AudioVAE weights.
155
  - `config.json`: BlueMagpie architecture/runtime config.
156
  - `tokenizer.json`, `tokenizer_config.json`: tokenizer files.
157
+ - `checkpoints/*speaker_centroids.pt`: small centroid demo artifacts.
158
  - `USAGE.md`: expanded usage guide.
USAGE.md CHANGED
@@ -55,6 +55,20 @@ wav = model.generate(
55
 
56
  ```
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  Streaming:
59
 
60
  ```python
 
55
 
56
  ```
57
 
58
+ Centroid demo:
59
+
60
+ ```python
61
+ import torch
62
+
63
+ table = torch.load(f"{model_dir}/checkpoints/speaker_centroids.pt", map_location="cpu")
64
+ wav = model.generate(
65
+ target_text="這是 centroid demo 的測試。",
66
+ speaker_centroid=table["centroids"][0],
67
+ cfg_value=2.0,
68
+ inference_timesteps=10,
69
+ )
70
+ ```
71
+
72
  Streaming:
73
 
74
  ```python
checkpoints/hung_yi_lee_speaker_centroids.pt ADDED
Binary file (2.69 kB). View file
 
checkpoints/speaker_centroids.pt ADDED
Binary file (3.31 kB). View file