Instructions to use jjiang4/thorsten_vits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use jjiang4/thorsten_vits with ESPnet:
from espnet2.bin.tts_inference import Text2Speech model = Text2Speech.from_pretrained("jjiang4/thorsten_vits") speech, *_ = model("text to generate speech from") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -29,17 +29,27 @@ with [`jjiang4/thorsten_hifigan_ft_ljspeech`](https://huggingface.co/jjiang4/tho
|
|
| 29 |
|
| 30 |
### Demo
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
```python
|
| 33 |
from espnet2.bin.tts_inference import Text2Speech
|
|
|
|
| 34 |
|
|
|
|
| 35 |
tts = Text2Speech.from_pretrained(
|
| 36 |
"jjiang4/thorsten_vits",
|
| 37 |
noise_scale=0.333, # defaults (0.667, 0.8) are worse at this step count
|
| 38 |
noise_scale_dur=0.0,
|
| 39 |
)
|
| 40 |
-
|
|
|
|
| 41 |
```
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
### Results
|
| 44 |
|
| 45 |
100-utterance test set. See the [recipe
|
|
|
|
| 29 |
|
| 30 |
### Demo
|
| 31 |
|
| 32 |
+
This model was trained on pre-phonemised text (`g2p: none`), so it expects a
|
| 33 |
+
space-separated phoneme string, not raw German. Convert the text with the same
|
| 34 |
+
espeak-ng German frontend the recipe uses:
|
| 35 |
+
|
| 36 |
```python
|
| 37 |
from espnet2.bin.tts_inference import Text2Speech
|
| 38 |
+
from espnet2.text.phoneme_tokenizer import PhonemeTokenizer
|
| 39 |
|
| 40 |
+
g2p = PhonemeTokenizer("espeak_ng_german")
|
| 41 |
tts = Text2Speech.from_pretrained(
|
| 42 |
"jjiang4/thorsten_vits",
|
| 43 |
noise_scale=0.333, # defaults (0.667, 0.8) are worse at this step count
|
| 44 |
noise_scale_dur=0.0,
|
| 45 |
)
|
| 46 |
+
text = "im prozess wurden aber nur vierzig fälle thematisiert."
|
| 47 |
+
wav = tts(" ".join(g2p.text2tokens(text)))["wav"]
|
| 48 |
```
|
| 49 |
|
| 50 |
+
Passing raw text runs but produces garbage: every word maps to the unknown
|
| 51 |
+
token, and the utterance above comes out 1.0 s long instead of 3.2 s.
|
| 52 |
+
|
| 53 |
### Results
|
| 54 |
|
| 55 |
100-utterance test set. See the [recipe
|