Download examples/basic.py from owensong/Inflect-Micro-v2: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/owensong/Inflect-Micro-v2/resolve/refs%2Fpr%2F8/examples/basic.py
- Command line
-
hf download hf://owensong/Inflect-Micro-v2@refs/pr/8/examples/basic.py
-
curl -L -o basic.py https://huggingface.co/owensong/Inflect-Micro-v2/resolve/refs%2Fpr%2F8/examples/basic.py
352 Bytes
| from pathlib import Path | |
| import sys | |
| MODEL_DIR = Path(__file__).resolve().parents[1] | |
| sys.path.insert(0, str(MODEL_DIR)) | |
| from inference import InflectTTS | |
| tts = InflectTTS(MODEL_DIR, device="cpu") | |
| tts.save( | |
| "A small local voice can still be useful.", | |
| MODEL_DIR / "example.wav", | |
| speed=1.0, | |
| variation=0.667, | |
| seed=7, | |
| ) | |