Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SimpleTTS
|
| 2 |
+
|
| 3 |
+
Decoder-only transformer TTS, using [WavTokenizer](https://github.com/jishengpeng/WavTokenizer)
|
| 4 |
+
as the audio codec.
|
| 5 |
+
|
| 6 |
+
## Samples
|
| 7 |
+
|
| 8 |
+
| Text | Audio |
|
| 9 |
+
| -------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
| 10 |
+
| Sample 1 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_1.wav"></audio> |
|
| 11 |
+
| Sample 2 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_2.wav"></audio> |
|
| 12 |
+
| Sample 3 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_3.wav"></audio> |
|
| 13 |
+
| Sample 4 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_4.wav"></audio> |
|
| 14 |
+
| Sample 5 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_5.wav"></audio> |
|
| 15 |
+
|
| 16 |
+
## Setup
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
git clone https://github.com/FirstPotatoCoder/SimpleTTS.git
|
| 20 |
+
cd SimpleTTS
|
| 21 |
+
bash setup.sh
|
| 22 |
+
python scripts/download_weights.py
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
## Run
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
python examples/run_inference.py "Hello, this is a quick test-run. I'm checking whether the model can handle longer input text without any issues. This sentence is roughly five times the length of the original short test phrase."
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
Or from Python:
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from tts.inference import TTSPipeline
|
| 35 |
+
|
| 36 |
+
pipe = TTSPipeline(
|
| 37 |
+
tts_weights="weights/tts.pt",
|
| 38 |
+
wavtokenizer_weights="weights/wavtokenizer.ckpt",
|
| 39 |
+
wavtokenizer_config="configs/wavtokenizer_config.yaml",
|
| 40 |
+
)
|
| 41 |
+
pipe.generate("Some text to speak.", out_path="out.wav")
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Limitations
|
| 45 |
+
|
| 46 |
+
- The model sometimes hallucinates, generating babbling or garbled output on rare or unseen words — likely due to the limited amount of training data.
|
| 47 |
+
- Works best when generating ~3s to 15s of audio, matching the length distribution of its training data.
|
| 48 |
+
- No chunking support yet — the current repo only supports clip-by-clip generation, one sample at a time.
|
| 49 |
+
|
| 50 |
+
## Credits
|
| 51 |
+
|
| 52 |
+
Audio tokenizer/codec: [WavTokenizer](https://github.com/jishengpeng/WavTokenizer)
|
| 53 |
+
(vendored under `wavtokenizer/`, trimmed to inference-only code).
|
| 54 |
+
|
| 55 |
+
Data synthesis: [Kokoro](https://github.com/hexgrad/kokoro), used to generate ~100 hours
|
| 56 |
+
of synthetic audio for training this TTS model.
|
| 57 |
+
|
| 58 |
+
Text phonemization: [espeak-ng](https://github.com/espeak-ng/espeak-ng), used to
|
| 59 |
+
convert input text into phonemes.
|