Update the model card: long text, final mark, unreadable text, F2 voice
Browse files
README.md
CHANGED
|
@@ -73,11 +73,17 @@ python -m tiny_voca.infer \
|
|
| 73 |
|
| 74 |
| Option | Default | Meaning |
|
| 75 |
|---|---|---|
|
|
|
|
| 76 |
| `--voice` | `F2` | `F2` or `M2` |
|
| 77 |
| `--speed` | 1.0 | Speaking rate |
|
| 78 |
| `--pitch-shift` | 0 | Added to log F0. 0.058 is about one semitone. |
|
| 79 |
| `--pitch-range` | 1.0 | Scales pitch movement around the utterance mean. |
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
### ONNX
|
| 82 |
|
| 83 |
The graph takes phoneme ids and stress values and returns the waveform. Text is
|
|
@@ -102,7 +108,9 @@ audio, durations = session.run(None, {
|
|
| 102 |
"pitch_shift": one(0.0),
|
| 103 |
"pitch_range": one(1.0),
|
| 104 |
})
|
| 105 |
-
|
|
|
|
|
|
|
| 106 |
```
|
| 107 |
|
| 108 |
| Input | Type | Shape | Meaning |
|
|
@@ -120,9 +128,14 @@ sf.write("hello.wav", audio[0], 24000)
|
|
| 120 |
| `durations` | int64 | [1, N] | Length of each token in frames of 256 samples |
|
| 121 |
|
| 122 |
The model reads one utterance per call, up to 512 tokens and 32 seconds. Split
|
| 123 |
-
longer text into sentences.
|
| 124 |
-
|
| 125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
## Model
|
| 128 |
|
|
@@ -181,6 +194,9 @@ formal listening test has been run.
|
|
| 181 |
|
| 182 |
- English only, two fixed voices, no voice cloning.
|
| 183 |
- The voice is clear but can sound slightly synthetic.
|
|
|
|
|
|
|
|
|
|
| 184 |
- The same text is always read the same way. There is no sampling of prosody.
|
| 185 |
- Speech is slightly faster than the training recordings at the default speed.
|
| 186 |
- Foreign names and unusual spellings are often mispronounced. Numbers,
|
|
|
|
| 73 |
|
| 74 |
| Option | Default | Meaning |
|
| 75 |
|---|---|---|
|
| 76 |
+
| `--text-file` | | Read the text from a file instead of `--text`. |
|
| 77 |
| `--voice` | `F2` | `F2` or `M2` |
|
| 78 |
| `--speed` | 1.0 | Speaking rate |
|
| 79 |
| `--pitch-shift` | 0 | Added to log F0. 0.058 is about one semitone. |
|
| 80 |
| `--pitch-range` | 1.0 | Scales pitch movement around the utterance mean. |
|
| 81 |
|
| 82 |
+
Text of any length works. The command reads it one sentence at a time and
|
| 83 |
+
joins the audio. A text that ends without a mark gets a full stop. A sentence
|
| 84 |
+
with nothing to read, such as one in another script, is skipped. The saved
|
| 85 |
+
audio never peaks above 0.99.
|
| 86 |
+
|
| 87 |
### ONNX
|
| 88 |
|
| 89 |
The graph takes phoneme ids and stress values and returns the waveform. Text is
|
|
|
|
| 108 |
"pitch_shift": one(0.0),
|
| 109 |
"pitch_range": one(1.0),
|
| 110 |
})
|
| 111 |
+
audio = audio[0]
|
| 112 |
+
audio = audio * min(1.0, 0.99 / np.abs(audio).max()) # the model can peak above 1.0
|
| 113 |
+
sf.write("hello.wav", audio, 24000)
|
| 114 |
```
|
| 115 |
|
| 116 |
| Input | Type | Shape | Meaning |
|
|
|
|
| 128 |
| `durations` | int64 | [1, N] | Length of each token in frames of 256 samples |
|
| 129 |
|
| 130 |
The model reads one utterance per call, up to 512 tokens and 32 seconds. Split
|
| 131 |
+
longer text into sentences; `tiny_voca.infer.speak_text` does this in Python.
|
| 132 |
+
End each utterance with a mark such as a full stop: without one the last word
|
| 133 |
+
breaks off.
|
| 134 |
+
The audio can peak a little above 1.0 (about one sentence in twenty), so scale
|
| 135 |
+
it down before you save 16-bit samples, as above. The same file runs in
|
| 136 |
+
onnxruntime-web (WebAssembly). Its audio matches the PyTorch model to within
|
| 137 |
+
0.6% of the peak amplitude, apart from the random noise signal, which each
|
| 138 |
+
runtime draws itself.
|
| 139 |
|
| 140 |
## Model
|
| 141 |
|
|
|
|
| 194 |
|
| 195 |
- English only, two fixed voices, no voice cloning.
|
| 196 |
- The voice is clear but can sound slightly synthetic.
|
| 197 |
+
- The F2 voice sounds younger than intended. It was designed as an adult voice
|
| 198 |
+
(the prompt asked for an adult American woman in her mid twenties; see
|
| 199 |
+
voices.json in the dataset). A more mature voice is planned.
|
| 200 |
- The same text is always read the same way. There is no sampling of prosody.
|
| 201 |
- Speech is slightly faster than the training recordings at the default speed.
|
| 202 |
- Foreign names and unusual spellings are often mispronounced. Numbers,
|