This commit is contained in:
Claudio Santini 2025-01-15 00:06:05 +01:00
parent 9a80c9cc52
commit c265c431be
3 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,4 @@
name: GitHub Action for installing and testing the package on Python 3.11 name: Installing via pip and running
run-name: pip install and run run-name: pip install and run
on: [ push, pull_request ] on: [ push, pull_request ]
jobs: jobs:

View file

@ -125,7 +125,7 @@ def create_m4b(chaptfer_files, filename):
print('Feel free to delete the intermediary .wav chapter files, the .m4b is all you need.') print('Feel free to delete the intermediary .wav chapter files, the .m4b is all you need.')
if __name__ == '__main__': def cli_main():
if not Path('kokoro-v0_19.onnx').exists() or not Path('voices.json').exists(): if not Path('kokoro-v0_19.onnx').exists() or not Path('voices.json').exists():
print('Error: kokoro-v0_19.onnx and voices.json must be in the current directory. Please download them with:') print('Error: kokoro-v0_19.onnx and voices.json must be in the current directory. Please download them with:')
print('wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx') print('wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx')
@ -146,3 +146,7 @@ if __name__ == '__main__':
sys.exit(1) sys.exit(1)
args = parser.parse_args() args = parser.parse_args()
main(kokoro, args.epub_file_path, args.lang, args.voice) main(kokoro, args.epub_file_path, args.lang, args.voice)
if __name__ == '__main__':
cli_main()

View file

@ -1,12 +1,12 @@
[project] [project]
name = "audiblez" name = "audiblez"
version = "0.1.2" version = "0.1.3"
description = "" description = ""
authors = [ authors = [
{ name = "Claudio Santini", email = "hireclaudio@gmail.com" } { name = "Claudio Santini", email = "hireclaudio@gmail.com" }
] ]
readme = "README.md" readme = "README.md"
requires-python = ">=3.10,<3.13" requires-python = ">=3.9,<3.13" # librosa/llvmlite have no support for python > 3.12
dependencies = [ dependencies = [
"bs4 (==0.0.2)", "bs4 (==0.0.2)",
"attrs (==24.3.0)", "attrs (==24.3.0)",
@ -89,4 +89,4 @@ Repository = "https://github.com/santinic/audiblez"
Issues = "https://github.com/santinic/audiblez/issues" Issues = "https://github.com/santinic/audiblez/issues"
[project.scripts] [project.scripts]
audiblez = "audiblez:main" audiblez = "audiblez:cli_main"