Skip to main content

Wyoming Server for Kokoro Torch

Project description

Wyoming Kokoro Torch

Wyoming protocol server for the original Kokoro Torch TTS implementation.

Contrary to other Wyoming implementation, wyoming-kokoro, this is one uses Torch instead of ONNX. As of the time of writing, our implementation also supports streaming mode, while the ONNX one doesn't. Streaming is important for LLM-based assistant, so that it can start speaking before the LLM is finished generating.

Local Install

Clone the repository and set up Python virtual environment:

git clone https://github.com/debackerl/wyoming-kokoro-torch.cpp.git
cd wyoming-kokoro-torch
script/setup

Download the base model:

mkdir /data
wget -O /data/kokoro-v1_0.pth https://huggingface.co/hexgrad/Kokoro-82M/resolve/main/kokoro-v1_0.pth
wget -O /data/config.json https://huggingface.co/hexgrad/Kokoro-82M/resolve/main/config.json

Run a server anyone can connect to:

script/run --voice af_heart --streaming --uri 'tcp://0.0.0.0:10300' --data-dir /data --download-dir /data

See available voices.

Remarks

If you run this in a VM, you may see Could not initialize NNPACK! Reason: Unsupported hardware. in the logs. This seems to happen on heterogeneous CPU architectures, like my AMD Ryzen AI 7 HX 370. Solutions seems to be either running bare-metal or pass the L3 cache information to the VM and tweak CPU affinity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wyoming_kokoro_torch-3.1.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wyoming_kokoro_torch-3.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file wyoming_kokoro_torch-3.1.1.tar.gz.

File metadata

  • Download URL: wyoming_kokoro_torch-3.1.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for wyoming_kokoro_torch-3.1.1.tar.gz
Algorithm Hash digest
SHA256 54aa00a4fee949530e0230a893f16c4d3dce27c27971db4e1a66caef03c8db90
MD5 77d8332bc602c4ab112586b6fd6701b7
BLAKE2b-256 d63316250c943ccdd1076218a29f3da9d84bdff288bd014dcacf2ea521c7b7a7

See more details on using hashes here.

File details

Details for the file wyoming_kokoro_torch-3.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wyoming_kokoro_torch-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd8f233fb06f33c8371ce0232a72d6c97dd70db449c9a12a072073a4b86bbad
MD5 098b80fbce6b6091029c25b853d4dccd
BLAKE2b-256 429e4acd4cfab8dea723a0bc793f0b3dbff449680eb9065020e9a9183358dbfd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page