general/other Kokoro-onnx for text to speech with Cuda on Freebsd with Emacs

Kokoro-onnx for text to speech with Cuda on Freebsd with Emacs


Using a simple python script to create an api using fastapi and uvicorn we can use kokoro-onnx using curl on the command line or using emacs and a couple of lines of elisp code

Cuda support on Freebsd using podman

Note you should be able to get this working on Linux,
Mac and Windows as well

Supports multiple languages
Offer multiple voices
Lightweight: ~300MB (quantized: ~80MB)

kokoro-onnx github


freebsd-cuda project


kokoro-onnx podman container for freebsd


kokoro-onnx install with cuda

uv init -p 3.12
uv venv
uv pip install kokoro-onnx soundfile "onnxruntime-gpu[cuda,cudnn]" fastapi

you will also need the following packages installed
libsndfile libffi-devel

download the model files


kokoro-api script


note you if you arent using the podman continer you will need to edit the script and change the MODEL_PATH and VOICES_PATH paths


@sachactube text to speech


freebsd root


freebsd dotfiles


freebsd bin

 
Back
Top