For those who want to only use venv and don't want to use dockers or astral-uv.
For those who prefer not to incorporate Docker or yet another package manager "astral-uv" (yawn), here's how to install this using python's built in venv:
python -m venv venv activate
pip install -e ".[cpu]" python -m docker.scripts.download_model --output api\src\models\v1_0 [It will report that there are download errors, it's nonsense, it is downloaded]
Set the following environmental variables, hopefully, all these will be removed in future versions, I have used other kokoro implementations and they don't require you to litter your environmental variables like these: PHONEMIZER_ESPEAK_LIBRARY: C:\Program Files\eSpeak NG\libespeak-ng.dll PYTHONUTF8: 1 PROJECT_ROOT: Your project path USE_GPU: false USE_ONNX: false MODEL_DIR: src\models VOICES_DIR: src\voices\v1_0 WEB_PLAYER_PATH: %PROJECT_ROOT%\web
python -m uvicorn api.src.main:app --host 0.0.0.0 --port 8880
Run by going to: http://localhost:8880/web/
Can this be packaged into an executable .exe file and invoked by passing parameters via cmd? For example: ./kokoro.exe --text="hello!" --model="models/xxx.pt" --output="hello.wav"
You can also use https://github.com/skwzrd/kokoro_slim