mitchsayre commited on
Commit
87af61d
·
1 Parent(s): 6c7f29c

Delete epoch=710-step=258422.ckpt

Browse files

Removing because it was getting flagged as malware

.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ *.wav filter=lfs diff=lfs merge=lfs -text
examples/generate_emotion_samples.py ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import sys
5
+ from dataclasses import asdict, dataclass
6
+ from pathlib import Path
7
+
8
+ REPO_ROOT = Path(__file__).resolve().parents[1]
9
+ SRC_DIR = REPO_ROOT / "src"
10
+ if str(SRC_DIR) not in sys.path:
11
+ sys.path.insert(0, str(SRC_DIR))
12
+
13
+ from wfloat_tts import SPEAKER_IDS, load_generator, write_wave
14
+
15
+
16
+ @dataclass(frozen=True)
17
+ class SampleSpec:
18
+ voice: str
19
+ emotion: str
20
+ intensity: float
21
+ text: str
22
+
23
+
24
+ SAMPLES = (
25
+ SampleSpec(
26
+ voice="skilled_hero_man",
27
+ emotion="joy",
28
+ intensity=0.7,
29
+ text="We did it! The bridge is secure and everyone made it across. Take a breath and enjoy this moment with me.",
30
+ ),
31
+ SampleSpec(
32
+ voice="skilled_hero_woman",
33
+ emotion="neutral",
34
+ intensity=0.5,
35
+ text="Stay close. The stones are loose near the edge. We will move carefully and get there together.",
36
+ ),
37
+ SampleSpec(
38
+ voice="fun_hero_man",
39
+ emotion="surprise",
40
+ intensity=0.6,
41
+ text="Wait, that worked? I pulled one lever, the whole wall spun around, and now there is treasure everywhere!",
42
+ ),
43
+ SampleSpec(
44
+ voice="fun_hero_woman",
45
+ emotion="joy",
46
+ intensity=0.7,
47
+ text="Come on, keep up! The crowd is cheering.",
48
+ ),
49
+ SampleSpec(
50
+ voice="strong_hero_man",
51
+ emotion="anger",
52
+ intensity=0.80,
53
+ text="Enough. You had your warning, and you kept pushing innocent people around. Take one more step, and I end this.",
54
+ ),
55
+ SampleSpec(
56
+ voice="strong_hero_woman",
57
+ emotion="anger",
58
+ intensity=0.8,
59
+ text="The chain is holding, and we are not letting this town fall today. Push harder.",
60
+ ),
61
+ SampleSpec(
62
+ voice="mad_scientist_man",
63
+ emotion="joy",
64
+ intensity=0.90,
65
+ text="Look at that reaction. The coils are singing, the chamber is stable, and the entire machine is finally alive. Oh, this is magnificent.",
66
+ ),
67
+ SampleSpec(
68
+ voice="mad_scientist_woman",
69
+ emotion="surprise",
70
+ intensity=0.80,
71
+ text="No, no, that's not possible. The formula should have crystallized, but it adapted instead. Do you realize what that means for the rest of my work?",
72
+ ),
73
+ SampleSpec(
74
+ voice="clever_villain_man",
75
+ emotion="dismissive",
76
+ intensity=0.60,
77
+ text="You came all this way for that little threat? I have heard sharper words from people with far less ambition. Sit down and let the adults finish the game.",
78
+ ),
79
+ SampleSpec(
80
+ voice="clever_villain_woman",
81
+ emotion="dismissive",
82
+ intensity=0.74,
83
+ text="Please. If that was your grand reveal, I expected more style and much better timing. You are already behind, and you still do not know the real plan.",
84
+ ),
85
+ SampleSpec(
86
+ voice="narrator_man",
87
+ emotion="neutral",
88
+ intensity=0.5,
89
+ text="The harbor was quiet again. The storm had passed in the night, leaving scattered crates, broken rope, and one unanswered question.",
90
+ ),
91
+ SampleSpec(
92
+ voice="narrator_woman",
93
+ emotion="sadness",
94
+ intensity=0.4,
95
+ text="When the letter finally arrived, no one rushed to open it. The room had grown too familiar with bad news, and hope had learned to speak softly.",
96
+ ),
97
+ SampleSpec(
98
+ voice="wise_elder_man",
99
+ emotion="anger",
100
+ intensity=0.4,
101
+ text="I have seen this mistake before. Pride speaks loudly in the beginning, but regret is the voice that stays with you. Listen while there is still time to change course.",
102
+ ),
103
+ SampleSpec(
104
+ voice="wise_elder_woman",
105
+ emotion="joy",
106
+ intensity=0.5,
107
+ text="There you are. The answer was never as far away as you feared, and your patience has finally borne fruit. Let yourself be proud of how far you have come.",
108
+ ),
109
+ SampleSpec(
110
+ voice="outgoing_anime_man",
111
+ emotion="joy",
112
+ intensity=0.8,
113
+ text="Yes. This is our chance, and I can feel the whole day lighting up around us. We are going in together, and we are coming out legends.",
114
+ ),
115
+ SampleSpec(
116
+ voice="outgoing_anime_woman",
117
+ emotion="surprise",
118
+ intensity=0.5,
119
+ text="Hold on, you are telling me that tiny mascot can drive the entire ship? That is completely ridiculous, and somehow it makes me want to see it even more.",
120
+ ),
121
+ SampleSpec(
122
+ voice="scary_villain_man",
123
+ emotion="anger",
124
+ intensity=0.5,
125
+ text="You should have stayed hidden. Now I know your face, your voice, and exactly how afraid you are trying not to sound. Run, if it helps you feel alive.",
126
+ ),
127
+ SampleSpec(
128
+ voice="scary_villain_woman",
129
+ emotion="fear",
130
+ intensity=0.80,
131
+ text="Did you hear that? The halls were silent a moment ago, and now something is moving behind the walls. Do not leave me alone with that sound.",
132
+ ),
133
+ SampleSpec(
134
+ voice="news_reporter_man",
135
+ emotion="neutral",
136
+ intensity=0.5,
137
+ text="We are live outside city hall, where officials say the meeting will begin within the hour. Security has tightened, and a large crowd is still gathering behind us.",
138
+ ),
139
+ SampleSpec(
140
+ voice="news_reporter_woman",
141
+ emotion="neutral",
142
+ intensity=0.6,
143
+ text="We are receiving conflicting reports from the scene. One agency says the system is back online, while another says key services are still down. We are working to confirm the facts.",
144
+ ),
145
+ )
146
+
147
+
148
+ def intensity_slug(value: float) -> str:
149
+ return f"{int(round(value * 100)):03d}"
150
+
151
+
152
+ def sample_filename(index: int, sample: SampleSpec) -> str:
153
+ return f"{index:02d}_{sample.voice}_{sample.emotion}_{intensity_slug(sample.intensity)}.wav"
154
+
155
+
156
+ def main() -> None:
157
+ output_dir = REPO_ROOT / "samples"
158
+ output_dir.mkdir(parents=True, exist_ok=True)
159
+
160
+ generator = load_generator(
161
+ checkpoint_path=REPO_ROOT / "model.safetensors",
162
+ config_path=REPO_ROOT / "config.json",
163
+ )
164
+
165
+ manifest: list[dict[str, object]] = []
166
+
167
+ for index, sample in enumerate(SAMPLES, start=1):
168
+ sid = SPEAKER_IDS[sample.voice]
169
+ audio = generator.generate(
170
+ text=sample.text,
171
+ sid=sid,
172
+ emotion=sample.emotion,
173
+ intensity=sample.intensity,
174
+ )
175
+ filename = sample_filename(index, sample)
176
+ output_path = output_dir / filename
177
+ write_wave(output_path, audio.samples, audio.sample_rate)
178
+ manifest.append(
179
+ {
180
+ "filename": filename,
181
+ "sid": sid,
182
+ **asdict(sample),
183
+ }
184
+ )
185
+ print(output_path.relative_to(REPO_ROOT))
186
+
187
+ manifest_path = output_dir / "manifest.json"
188
+ manifest_path.write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8")
189
+ print(manifest_path.relative_to(REPO_ROOT))
190
+
191
+
192
+ if __name__ == "__main__":
193
+ main()
samples/01_skilled_hero_man_joy_070.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9dd30979c71a6fd9bfeff98cd0142684a25eef9a544730f4ffd691286a6d9e1
3
+ size 236076
samples/02_skilled_hero_woman_neutral_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d07939b3ced69fc3946e6473ae458843809c7c31c01427c72fe04e089cf7c1b5
3
+ size 204844
samples/03_fun_hero_man_surprise_060.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca4a878cfbf27d78ede4419a8e3ffc34095307d667cd0a4b9956d046f23c8e60
3
+ size 264748
samples/04_fun_hero_woman_joy_070.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f89d36d2ca1d149f2eb6afc26a5e34cb81c87801f811aac5d9fd79bfa9c8882
3
+ size 103980
samples/05_strong_hero_man_anger_080.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:baa04c1e568a213ed430cf11aacb0a71969818a1fdb4a218999aa4a85a708b96
3
+ size 307244
samples/06_strong_hero_woman_anger_080.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3eb50d9f75ea3fb7a0017bfd668d523c3543cffddce127a68a81cf4966f52af9
3
+ size 209452
samples/07_mad_scientist_man_joy_090.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d1069c891e96c8e0cdbf6858c47e391b6319de1a723ce2e486bcb2d5518ed23
3
+ size 415276
samples/08_mad_scientist_woman_surprise_080.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e64626702148e9eb0ed6d8fa8edcb34278521c38af113598b521dd96194d4ec0
3
+ size 372780
samples/09_clever_villain_man_dismissive_060.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac4315e4dc5e19dd5eb93f636985e73f9983e2bb5a443c9240e7805e65897fdd
3
+ size 338988
samples/10_clever_villain_woman_dismissive_074.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:585cbe0fb2e8ec8e500528bec5a46d7401f67d37dd1fc0cfc2a5c5bc6fb54a4c
3
+ size 391724
samples/11_narrator_man_neutral_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:670f9273663ae845cd283ecec295642994406a15f487e45780f6c296b8268afc
3
+ size 348204
samples/12_narrator_woman_sadness_040.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:654757ddaeabf9b4b004e48b626438218cc0d19467815c714ddf7e0c8e1ea45b
3
+ size 346156
samples/13_wise_elder_man_anger_040.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4b48e59481bd6f764c8cace0c09bd9acc7821b8e90587572a0923ba7c1ac609
3
+ size 343596
samples/14_wise_elder_woman_joy_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71d6efe48bafe8ebbf4341f6a6e63b817c0f7a9dd9021a72d1d41dfdf5544e4f
3
+ size 365612
samples/15_outgoing_anime_man_joy_080.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c19313088762b13130ad898b70e90b397449864857cb0fdc398f8075b7f23128
3
+ size 310316
samples/16_outgoing_anime_woman_surprise_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30491594ecd680c21bb01b32cde72fe78c04e926b6ba5e0cd78da821ab75e6ee
3
+ size 354860
samples/17_scary_villain_man_anger_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0b1a7b8d91b509e6ebf167dc483c2f4746695e3611ca0b77acf972697b71a13
3
+ size 382508
samples/18_scary_villain_woman_fear_080.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6be568ede696e7ae877c31d09705eb1ce2a30784b28f0629c573421824194683
3
+ size 321580
samples/19_news_reporter_man_neutral_050.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fdc2eaa384e09007ba76bfc672caa38c4d413db4897ec47d73a641fd758cf91
3
+ size 353324
samples/20_news_reporter_woman_neutral_060.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd95657ded3cd70926c65537087d72f4bfb1371e4b17a6f0851320f6ea0e2249
3
+ size 413228
samples/manifest.json ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "filename": "01_skilled_hero_man_joy_070.wav",
4
+ "sid": 0,
5
+ "voice": "skilled_hero_man",
6
+ "emotion": "joy",
7
+ "intensity": 0.7,
8
+ "text": "We did it! The bridge is secure and everyone made it across. Take a breath and enjoy this moment with me."
9
+ },
10
+ {
11
+ "filename": "02_skilled_hero_woman_neutral_050.wav",
12
+ "sid": 1,
13
+ "voice": "skilled_hero_woman",
14
+ "emotion": "neutral",
15
+ "intensity": 0.5,
16
+ "text": "Stay close. The stones are loose near the edge. We will move carefully and get there together."
17
+ },
18
+ {
19
+ "filename": "03_fun_hero_man_surprise_060.wav",
20
+ "sid": 2,
21
+ "voice": "fun_hero_man",
22
+ "emotion": "surprise",
23
+ "intensity": 0.6,
24
+ "text": "Wait, that worked? I pulled one lever, the whole wall spun around, and now there is treasure everywhere!"
25
+ },
26
+ {
27
+ "filename": "04_fun_hero_woman_joy_070.wav",
28
+ "sid": 3,
29
+ "voice": "fun_hero_woman",
30
+ "emotion": "joy",
31
+ "intensity": 0.7,
32
+ "text": "Come on, keep up! The crowd is cheering."
33
+ },
34
+ {
35
+ "filename": "05_strong_hero_man_anger_080.wav",
36
+ "sid": 4,
37
+ "voice": "strong_hero_man",
38
+ "emotion": "anger",
39
+ "intensity": 0.8,
40
+ "text": "Enough. You had your warning, and you kept pushing innocent people around. Take one more step, and I end this."
41
+ },
42
+ {
43
+ "filename": "06_strong_hero_woman_anger_080.wav",
44
+ "sid": 5,
45
+ "voice": "strong_hero_woman",
46
+ "emotion": "anger",
47
+ "intensity": 0.8,
48
+ "text": "The chain is holding, and we are not letting this town fall today. Push harder."
49
+ },
50
+ {
51
+ "filename": "07_mad_scientist_man_joy_090.wav",
52
+ "sid": 6,
53
+ "voice": "mad_scientist_man",
54
+ "emotion": "joy",
55
+ "intensity": 0.9,
56
+ "text": "Look at that reaction. The coils are singing, the chamber is stable, and the entire machine is finally alive. Oh, this is magnificent."
57
+ },
58
+ {
59
+ "filename": "08_mad_scientist_woman_surprise_080.wav",
60
+ "sid": 7,
61
+ "voice": "mad_scientist_woman",
62
+ "emotion": "surprise",
63
+ "intensity": 0.8,
64
+ "text": "No, no, that's not possible. The formula should have crystallized, but it adapted instead. Do you realize what that means for the rest of my work?"
65
+ },
66
+ {
67
+ "filename": "09_clever_villain_man_dismissive_060.wav",
68
+ "sid": 8,
69
+ "voice": "clever_villain_man",
70
+ "emotion": "dismissive",
71
+ "intensity": 0.6,
72
+ "text": "You came all this way for that little threat? I have heard sharper words from people with far less ambition. Sit down and let the adults finish the game."
73
+ },
74
+ {
75
+ "filename": "10_clever_villain_woman_dismissive_074.wav",
76
+ "sid": 9,
77
+ "voice": "clever_villain_woman",
78
+ "emotion": "dismissive",
79
+ "intensity": 0.74,
80
+ "text": "Please. If that was your grand reveal, I expected more style and much better timing. You are already behind, and you still do not know the real plan."
81
+ },
82
+ {
83
+ "filename": "11_narrator_man_neutral_050.wav",
84
+ "sid": 10,
85
+ "voice": "narrator_man",
86
+ "emotion": "neutral",
87
+ "intensity": 0.5,
88
+ "text": "The harbor was quiet again. The storm had passed in the night, leaving scattered crates, broken rope, and one unanswered question."
89
+ },
90
+ {
91
+ "filename": "12_narrator_woman_sadness_040.wav",
92
+ "sid": 11,
93
+ "voice": "narrator_woman",
94
+ "emotion": "sadness",
95
+ "intensity": 0.4,
96
+ "text": "When the letter finally arrived, no one rushed to open it. The room had grown too familiar with bad news, and hope had learned to speak softly."
97
+ },
98
+ {
99
+ "filename": "13_wise_elder_man_anger_040.wav",
100
+ "sid": 12,
101
+ "voice": "wise_elder_man",
102
+ "emotion": "anger",
103
+ "intensity": 0.4,
104
+ "text": "I have seen this mistake before. Pride speaks loudly in the beginning, but regret is the voice that stays with you. Listen while there is still time to change course."
105
+ },
106
+ {
107
+ "filename": "14_wise_elder_woman_joy_050.wav",
108
+ "sid": 13,
109
+ "voice": "wise_elder_woman",
110
+ "emotion": "joy",
111
+ "intensity": 0.5,
112
+ "text": "There you are. The answer was never as far away as you feared, and your patience has finally borne fruit. Let yourself be proud of how far you have come."
113
+ },
114
+ {
115
+ "filename": "15_outgoing_anime_man_joy_080.wav",
116
+ "sid": 14,
117
+ "voice": "outgoing_anime_man",
118
+ "emotion": "joy",
119
+ "intensity": 0.8,
120
+ "text": "Yes. This is our chance, and I can feel the whole day lighting up around us. We are going in together, and we are coming out legends."
121
+ },
122
+ {
123
+ "filename": "16_outgoing_anime_woman_surprise_050.wav",
124
+ "sid": 15,
125
+ "voice": "outgoing_anime_woman",
126
+ "emotion": "surprise",
127
+ "intensity": 0.5,
128
+ "text": "Hold on, you are telling me that tiny mascot can drive the entire ship? That is completely ridiculous, and somehow it makes me want to see it even more."
129
+ },
130
+ {
131
+ "filename": "17_scary_villain_man_anger_050.wav",
132
+ "sid": 16,
133
+ "voice": "scary_villain_man",
134
+ "emotion": "anger",
135
+ "intensity": 0.5,
136
+ "text": "You should have stayed hidden. Now I know your face, your voice, and exactly how afraid you are trying not to sound. Run, if it helps you feel alive."
137
+ },
138
+ {
139
+ "filename": "18_scary_villain_woman_fear_080.wav",
140
+ "sid": 17,
141
+ "voice": "scary_villain_woman",
142
+ "emotion": "fear",
143
+ "intensity": 0.8,
144
+ "text": "Did you hear that? The halls were silent a moment ago, and now something is moving behind the walls. Do not leave me alone with that sound."
145
+ },
146
+ {
147
+ "filename": "19_news_reporter_man_neutral_050.wav",
148
+ "sid": 18,
149
+ "voice": "news_reporter_man",
150
+ "emotion": "neutral",
151
+ "intensity": 0.5,
152
+ "text": "We are live outside city hall, where officials say the meeting will begin within the hour. Security has tightened, and a large crowd is still gathering behind us."
153
+ },
154
+ {
155
+ "filename": "20_news_reporter_woman_neutral_060.wav",
156
+ "sid": 19,
157
+ "voice": "news_reporter_woman",
158
+ "emotion": "neutral",
159
+ "intensity": 0.6,
160
+ "text": "We are receiving conflicting reports from the scene. One agency says the system is back online, while another says key services are still down. We are working to confirm the facts."
161
+ }
162
+ ]