English-TTS / README.md
AnotherPotatoCoder's picture
Upload README.md with huggingface_hub
bc381c7 verified
|
Raw
History Blame Contribute Delete
2.69 kB
---
license: mit
language:
- km
tags:
- text-to-speech
- tts
- khmer
---
# SimpleTTS
Decoder-only transformer TTS, using [WavTokenizer](https://github.com/jishengpeng/WavTokenizer)
as the audio codec.
## Samples
| Text | Audio |
| -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Sample 1 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_1.wav"></audio> |
| Sample 2 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_2.wav"></audio> |
| Sample 3 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_3.wav"></audio> |
| Sample 4 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_4.wav"></audio> |
| Sample 5 | <audio controls src="https://huggingface.co/AnotherPotatoCoder/English-TTS/resolve/main/sample_audios/sample_5.wav"></audio> |
## Setup
```bash
git clone https://github.com/FirstPotatoCoder/SimpleTTS.git
cd SimpleTTS
bash setup.sh
python scripts/download_weights.py
```
## Run
```bash
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."
```
Or from Python:
```python
from tts.inference import TTSPipeline
pipe = TTSPipeline(
tts_weights="weights/tts.pt",
wavtokenizer_weights="weights/wavtokenizer.ckpt",
wavtokenizer_config="configs/wavtokenizer_config.yaml",
)
pipe.generate("Some text to speak.", out_path="out.wav")
```
## Limitations
- The model sometimes hallucinates, generating babbling or garbled output on rare or unseen words — likely due to the limited amount of training data.
- Works best when generating ~3s to 15s of audio, matching the length distribution of its training data.
- No chunking support yet — the current repo only supports clip-by-clip generation, one sample at a time.
## Credits
Audio tokenizer/codec: [WavTokenizer](https://github.com/jishengpeng/WavTokenizer)
(vendored under `wavtokenizer/`, trimmed to inference-only code).
Data synthesis: [Kokoro](https://github.com/hexgrad/kokoro), used to generate ~100 hours
of synthetic audio for training this TTS model.
Text phonemization: [espeak-ng](https://github.com/espeak-ng/espeak-ng), used to
convert input text into phonemes.