Instructions to use Wfloat/wfloat-tts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Piper
How to use Wfloat/wfloat-tts with Piper:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download examples/basic_infer.py from Wfloat/wfloat-tts: direct link, hf CLI and curl.
- Browser
- Download file 484 Bytes
-
https://huggingface.co/Wfloat/wfloat-tts/resolve/main/examples/basic_infer.py
- Command line
-
hf download hf://Wfloat/wfloat-tts/examples/basic_infer.py
-
curl -L -o basic_infer.py https://huggingface.co/Wfloat/wfloat-tts/resolve/main/examples/basic_infer.py
484 Bytes
| from wfloat_tts import load_generator, write_wave | |
| def main() -> None: | |
| generator = load_generator( | |
| checkpoint_path="model.safetensors", | |
| config_path="config.json", | |
| ) | |
| audio = generator.generate( | |
| text="Hey there, how are you today?", | |
| sid=11, | |
| emotion="neutral", | |
| intensity=0.5, | |
| ) | |
| out_path = "out.wav" | |
| write_wave(out_path, audio.samples, audio.sample_rate) | |
| print(out_path) | |
| if __name__ == "__main__": | |
| main() | |