mirror of
https://github.com/santinic/audiblez.git
synced 2025-09-18 21:40:39 +00:00
fix
This commit is contained in:
parent
2a1e687020
commit
f614ed3979
3 changed files with 70 additions and 8 deletions
39
.github/workflows/pip-install.yaml
vendored
39
.github/workflows/pip-install.yaml
vendored
|
@ -2,19 +2,42 @@ name: GitHub Action for installing and testing the package on Python 3.11
|
|||
run-name: pip install and run
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
install-and-run:
|
||||
install-and-run-on-python-3-11:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Python 3.11
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install audiblez
|
||||
run: |
|
||||
python -m pip install audiblez
|
||||
run: python -m pip install audiblez
|
||||
- name: Check it runs as module
|
||||
run: |
|
||||
python -m audiblez --help
|
||||
run: python -m audiblez --help
|
||||
- name: check it runs as script
|
||||
run: |
|
||||
audiblez --help
|
||||
run: audiblez --help
|
||||
install-and-run-on-python-3-12:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install audiblez
|
||||
run: python -m pip install audiblez
|
||||
- name: Check it runs as module
|
||||
run: python -m audiblez --help
|
||||
- name: check it runs as script
|
||||
run: audiblez --help
|
||||
install-and-run-on-python-3-10:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install audiblez
|
||||
run: python -m pip install audiblez
|
||||
- name: Check it runs as module
|
||||
run: python -m audiblez --help
|
||||
- name: check it runs as script
|
||||
run: audiblez --help
|
||||
|
|
34
.github/workflows/publish.yaml
vendored
Normal file
34
.github/workflows/publish.yaml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Publish Python wheel to PyPI with poetry
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: python -m pip install poetry
|
||||
- name: Install dependencies
|
||||
run: poetry install --sync --no-interaction
|
||||
- name: Build wheel
|
||||
run: poetry build
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
publish-to-pypi:
|
||||
name: Publish to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/audiblez
|
||||
permissions:
|
||||
id-token: write
|
|
@ -128,6 +128,11 @@ def create_m4b(chaptfer_files, filename):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
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('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/voices.json')
|
||||
sys.exit(1)
|
||||
voices = list(kokoro.get_voices())
|
||||
voices_str = ', '.join(voices)
|
||||
epilog = 'example:\n' + \
|
||||
|
|
Loading…
Add table
Reference in a new issue