Instructions to use khmerttsopensource/khmer-tts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khmerttsopensource/khmer-tts with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="khmerttsopensource/khmer-tts")# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("khmerttsopensource/khmer-tts") model = AutoModelForPreTraining.from_pretrained("khmerttsopensource/khmer-tts") - Notebooks
- Google Colab
- Kaggle
| # Upload To Hugging Face | |
| Install and authenticate the Hugging Face CLI: | |
| ```bash | |
| curl -LsSf https://hf.co/cli/install.sh | bash -s | |
| hf auth login | |
| ``` | |
| Upload this folder as a model repository: | |
| ```bash | |
| cd huggingface/khmer-tts | |
| hf upload khmerttsopensource/khmer-tts . . | |
| ``` | |
| For a private first upload: | |
| ```bash | |
| hf upload khmerttsopensource/khmer-tts . . --private | |
| ``` | |
| After upload, test loading from the Hub: | |
| ```bash | |
| python examples/inference.py \ | |
| --model khmerttsopensource/khmer-tts \ | |
| --text "សួស្តីអ្នកទាំងអស់គ្នា" \ | |
| --output khmer_tts.wav | |
| ``` | |