Card: v1 results
Browse files
README.md
CHANGED
|
@@ -14,8 +14,8 @@ datasets:
|
|
| 14 |
|
| 15 |
tiny-broca is a small **Brazilian Portuguese** text-to-speech model with two
|
| 16 |
voices, F1 (female) and M1 (male). The complete model, including the waveform
|
| 17 |
-
generator, has 4.5M parameters and was trained from scratch on
|
| 18 |
-
|
| 19 |
|
| 20 |
<audio controls src="https://huggingface.co/brenorb/tiny-broca/resolve/main/samples/F1-1.wav"></audio>
|
| 21 |
|
|
@@ -31,6 +31,17 @@ of synthetic speech.
|
|
| 31 |
| Pretrained weights in the model | None |
|
| 32 |
| License | Apache-2.0 |
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
## Files
|
| 35 |
|
| 36 |
| File | Contents |
|
|
@@ -38,7 +49,7 @@ of synthetic speech.
|
|
| 38 |
| `tiny-broca.pt` | PyTorch weights, float32 |
|
| 39 |
| `onnx/model.onnx` | ONNX export, float32, opset 17 |
|
| 40 |
| `config.json` | Released settings: the model block (sample rate, windows, voices, vocabulary size) plus the phonemiser identity, letter vocabulary, and ONNX inputs/outputs that the web demo reads |
|
| 41 |
-
| `text.py` | The front end module, verbatim (the web demo runs it in the browser) |
|
| 42 |
| `samples/` | The audio on this page |
|
| 43 |
|
| 44 |
## Samples
|
|
@@ -152,8 +163,8 @@ once per frame (256 samples, 10.7 ms). This part has 25,862 parameters.
|
|
| 152 |
|
| 153 |
| | |
|
| 154 |
|---|---|
|
| 155 |
-
| Data | [brenorb/tiny-broca](https://huggingface.co/datasets/brenorb/tiny-broca):
|
| 156 |
-
| Steps | 118,000 |
|
| 157 |
| Losses | Multi-resolution spectral losses; adversarial loss with multi-period and multi-resolution discriminators after step 8,000 |
|
| 158 |
| Hardware | Apple M4 Pro, 18-core, MPS |
|
| 159 |
|
|
@@ -170,11 +181,38 @@ continues for 14,000 more steps (to step 118,000) on the same data plus
|
|
| 170 |
`batch3`, money phrases: the generator tends to rush long number strings, so
|
| 171 |
the later rounds give money values extra weight.
|
| 172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
## Evaluation
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
## Limitations
|
| 180 |
|
|
@@ -183,7 +221,11 @@ way for reference. (Pending the training run.)
|
|
| 183 |
- The same text is always read the same way. There is no sampling of prosody.
|
| 184 |
- Very long number strings (a dozen or more words) are read a little faster
|
| 185 |
than the training data; the duration predictor compresses them slightly.
|
| 186 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
- No streaming.
|
| 188 |
- The training data is itself synthetic, so the model cannot be more natural
|
| 189 |
than the model that generated it.
|
|
|
|
| 14 |
|
| 15 |
tiny-broca is a small **Brazilian Portuguese** text-to-speech model with two
|
| 16 |
voices, F1 (female) and M1 (male). The complete model, including the waveform
|
| 17 |
+
generator, has 4.5M parameters and was trained from scratch on synthetic
|
| 18 |
+
speech.
|
| 19 |
|
| 20 |
<audio controls src="https://huggingface.co/brenorb/tiny-broca/resolve/main/samples/F1-1.wav"></audio>
|
| 21 |
|
|
|
|
| 31 |
| Pretrained weights in the model | None |
|
| 32 |
| License | Apache-2.0 |
|
| 33 |
|
| 34 |
+
## v1
|
| 35 |
+
|
| 36 |
+
v1 fixes what v0 read wrongly. The front end now writes out what a Brazilian
|
| 37 |
+
reader says: `online` → "onlaine", `4 > 3` → "quatro maior que três",
|
| 38 |
+
`R$3,00` → "três reais", `14/03` → "quatorze de março", along with acronyms,
|
| 39 |
+
units, ordinals, roman numerals, dates and 948 English loanwords. The training
|
| 40 |
+
audio was re-read from these spoken forms, and unvoiced sounds are now made
|
| 41 |
+
from noise. On the probe suite, missed keywords fell from 242 to 18 of 574.
|
| 42 |
+
The v0 release is tagged `v0` in this repository. Details:
|
| 43 |
+
[docs/v1.md](https://github.com/brenorb/tiny-broca/blob/main/docs/v1.md).
|
| 44 |
+
|
| 45 |
## Files
|
| 46 |
|
| 47 |
| File | Contents |
|
|
|
|
| 49 |
| `tiny-broca.pt` | PyTorch weights, float32 |
|
| 50 |
| `onnx/model.onnx` | ONNX export, float32, opset 17 |
|
| 51 |
| `config.json` | Released settings: the model block (sample rate, windows, voices, vocabulary size) plus the phonemiser identity, letter vocabulary, and ONNX inputs/outputs that the web demo reads |
|
| 52 |
+
| `text.py` | The front end module (version 2), verbatim (the web demo runs it in the browser) |
|
| 53 |
| `samples/` | The audio on this page |
|
| 54 |
|
| 55 |
## Samples
|
|
|
|
| 163 |
|
| 164 |
| | |
|
| 165 |
|---|---|
|
| 166 |
+
| Data | [brenorb/tiny-broca](https://huggingface.co/datasets/brenorb/tiny-broca), v1 training set: 12,026 sentences, 26,130 clips, 28.2 hours, two voices |
|
| 167 |
+
| Steps | 148,000: 118,000 for v0, then 30,000 on the v1 data |
|
| 168 |
| Losses | Multi-resolution spectral losses; adversarial loss with multi-period and multi-resolution discriminators after step 8,000 |
|
| 169 |
| Hardware | Apple M4 Pro, 18-core, MPS |
|
| 170 |
|
|
|
|
| 181 |
`batch3`, money phrases: the generator tends to rush long number strings, so
|
| 182 |
the later rounds give money values extra weight.
|
| 183 |
|
| 184 |
+
v1 continues from v0's full training state (step 118,000) for 30,000 steps on
|
| 185 |
+
the v1 training set: `batch1` and `batch2` without the 2,821 v0 sentences that
|
| 186 |
+
had been read from digits and symbols, plus `batch4` (new coverage) and
|
| 187 |
+
`batch5` (those v0 sentences re-read from their spoken form). From v1 on, the
|
| 188 |
+
harmonic branch of the waveform head is excited with noise in unvoiced frames.
|
| 189 |
+
|
| 190 |
## Evaluation
|
| 191 |
|
| 192 |
+
The synthesized speech is transcribed automatically and compared with the
|
| 193 |
+
words the text should produce. This measures whether the words come out, not
|
| 194 |
+
how natural they sound.
|
| 195 |
+
|
| 196 |
+
**Probe suite.** 287 sentences in 29 categories (numbers, money, dates,
|
| 197 |
+
symbols, acronyms, loanwords, stress, prosody...), read by both voices: 574
|
| 198 |
+
clips, transcribed by Whisper medium and parakeet. A keyword counts as missed
|
| 199 |
+
when neither of them hears it.
|
| 200 |
+
|
| 201 |
+
| | Keywords missed | Word error rate |
|
| 202 |
+
|---|---:|---:|
|
| 203 |
+
| v0 | 242 of 574 | 20.0% |
|
| 204 |
+
| v0 weights with the v1 front end | 43 of 574 | 6.3% |
|
| 205 |
+
| v1 | 18 of 574 | 2.5% |
|
| 206 |
+
|
| 207 |
+
Of v1's 18 misses, 8 are roman numerals the transcribers write as numerals
|
| 208 |
+
("Dom Pedro II" for "segundo"), and 2 are "CEO", whose respelling was fixed
|
| 209 |
+
after the run. The rest: "Copa XX" read as letters, "Paraty" and "Itu",
|
| 210 |
+
"story" and "crush".
|
| 211 |
+
|
| 212 |
+
**Held-out sentences** (Whisper small, numbers included). On 16 sentences
|
| 213 |
+
outside every split, v0 had 8.1% word error and v1 has 1.5%. On 50 test-split
|
| 214 |
+
clips v1 has 2.1%; the teacher's own recordings of the same sentences have
|
| 215 |
+
2.8%.
|
| 216 |
|
| 217 |
## Limitations
|
| 218 |
|
|
|
|
| 221 |
- The same text is always read the same way. There is no sampling of prosody.
|
| 222 |
- Very long number strings (a dozen or more words) are read a little faster
|
| 223 |
than the training data; the duration predictor compresses them slightly.
|
| 224 |
+
- Words outside the loanword table, foreign names and unusual spellings
|
| 225 |
+
(Paraty) are often mispronounced.
|
| 226 |
+
- Ambiguous text gets one reading. A number from 1900 to 2099 is read as a
|
| 227 |
+
year only where something marks a date, and an English word that is also
|
| 228 |
+
Portuguese ("set", "date") is respelled only inside a phrase that settles it.
|
| 229 |
- No streaming.
|
| 230 |
- The training data is itself synthetic, so the model cannot be more natural
|
| 231 |
than the model that generated it.
|