Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CLI interface #102

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Add a CLI interface #102

merged 2 commits into from
Feb 18, 2025

Conversation

etrotta
Copy link
Contributor

@etrotta etrotta commented Feb 17, 2025

Adds a minimal CLI interface using argparse, to include example usage within the package + serve as a quick way to verify if you installed correctly + any quick testing involving kokoro

Example usage:

python3 -m kokoro --text "The sky above the port was the color of television, tuned to a dead channel." -o file.wav --debug

echo "Bom dia mundo, como vão vocês" > text.txt
uv tool install --with pip --no-build-isolation .
kokoro -i text.txt --voice pm_alex -o audio.wav

Also migrates the packaging configuration to use pyproject.toml with hatch + uv, removing setup.py and setuptools

Originally I was going to try and stick with setuptools over forcing what I personally consider to be best practices, but when I saw that misaki already uses uv+hatch I figured I may as well do it.

Regarding the minimum version bump, 3.10 was the oldest version I could set it to without uv complaining, not sure if you could set it to 3.9 but even the numpy version currently required has dropped support for 3.8 and older so it's going to have to be either 3.9 or 3.10

@etrotta
Copy link
Contributor Author

etrotta commented Feb 17, 2025

Side note: I also suffered from explosion/spaCy#13747 while testing, probably shouldn't be a huge issue though

@hexgrad
Copy link
Owner

hexgrad commented Feb 18, 2025

Thanks for the PR. Will merge this in ~3 hours at 9 PM PST

@hexgrad hexgrad merged commit cd7afb5 into hexgrad:main Feb 18, 2025
@etrotta etrotta deleted the cli branch February 18, 2025 13:52
@rapjul
Copy link

rapjul commented Mar 4, 2025

Side note: I also suffered from explosion/spaCy#13747 while testing, probably shouldn't be a huge issue though

I needed to use this command to get pip included in the program when using uv:

uv tool install --python 3.12 --with pip kokoro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants