voicerender 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- voicerender-0.1.1/.codecrate.toml +24 -0
- voicerender-0.1.1/.github/workflows/codecov.yml +29 -0
- voicerender-0.1.1/.github/workflows/pre-commit.yml +31 -0
- voicerender-0.1.1/.github/workflows/python-publish.yml +84 -0
- voicerender-0.1.1/.github/workflows/tests.yml +247 -0
- voicerender-0.1.1/.gitignore +222 -0
- voicerender-0.1.1/.ledger/ledger.toml +24 -0
- voicerender-0.1.1/.ledger/releaseledger/.ledger-project.toml +6 -0
- voicerender-0.1.1/.ledger/releaseledger/config.toml +57 -0
- voicerender-0.1.1/.ledger/releaseledger/data/.ledger-project.toml +6 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/events/events.jsonl +6 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/audit/commit-audit.yaml +326 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0001.md +26 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0002.md +61 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0003.md +57 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0004.md +30 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0005.md +68 -0
- voicerender-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/release.md +27 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/audit-decisions.yaml +160 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/entries.yaml +179 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/264eb9b.patch +5577 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/774f6f2.patch +446 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/9e71e84.patch +316 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/c4a2872.patch +13466 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/fb7faaf.patch +2801 -0
- voicerender-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/manifest.json +173 -0
- voicerender-0.1.1/.ledger/taskledger/.ledger-project.toml +6 -0
- voicerender-0.1.1/.ledger/taskledger/config.toml +7 -0
- voicerender-0.1.1/.pre-commit-config.yaml +64 -0
- voicerender-0.1.1/LICENSE +201 -0
- voicerender-0.1.1/MANIFEST.in +2 -0
- voicerender-0.1.1/PKG-INFO +254 -0
- voicerender-0.1.1/README.md +220 -0
- voicerender-0.1.1/docs/Makefile +32 -0
- voicerender-0.1.1/docs/changelog.md +15 -0
- voicerender-0.1.1/docs/conf.py +101 -0
- voicerender-0.1.1/docs/make.bat +113 -0
- voicerender-0.1.1/docs/make.py +89 -0
- voicerender-0.1.1/docs/requirements.txt +5 -0
- voicerender-0.1.1/docs/utterplan-v5-integration.md +77 -0
- voicerender-0.1.1/examples/plans/chapter.utterplan.toml +13 -0
- voicerender-0.1.1/examples/plans/chapter.voiceplan.toml +23 -0
- voicerender-0.1.1/examples/voices/piper.toml +10 -0
- voicerender-0.1.1/examples/voices/pocket-reference.toml +10 -0
- voicerender-0.1.1/examples/voices/voice.toml +9 -0
- voicerender-0.1.1/pyproject.toml +74 -0
- voicerender-0.1.1/setup.cfg +4 -0
- voicerender-0.1.1/tests/fixtures/utterplan_v5_contract.toml +36 -0
- voicerender-0.1.1/tests/test_backends.py +180 -0
- voicerender-0.1.1/tests/test_capacity.py +398 -0
- voicerender-0.1.1/tests/test_cli_v5.py +236 -0
- voicerender-0.1.1/tests/test_engine_registry.py +330 -0
- voicerender-0.1.1/tests/test_manifest.py +229 -0
- voicerender-0.1.1/tests/test_render_v5.py +1072 -0
- voicerender-0.1.1/tests/test_renderer.py +299 -0
- voicerender-0.1.1/tests/test_utterplan_v5.py +224 -0
- voicerender-0.1.1/voicerender/__init__.py +127 -0
- voicerender-0.1.1/voicerender/__main__.py +3 -0
- voicerender-0.1.1/voicerender/_version.py +24 -0
- voicerender-0.1.1/voicerender/capacity.py +678 -0
- voicerender-0.1.1/voicerender/cli.py +345 -0
- voicerender-0.1.1/voicerender/engines/__init__.py +68 -0
- voicerender-0.1.1/voicerender/engines/api_probe.py +495 -0
- voicerender-0.1.1/voicerender/engines/base.py +425 -0
- voicerender-0.1.1/voicerender/engines/catalog.py +83 -0
- voicerender-0.1.1/voicerender/engines/inflectsynth.py +920 -0
- voicerender-0.1.1/voicerender/engines/kittensynth.py +511 -0
- voicerender-0.1.1/voicerender/engines/kokoro.py +725 -0
- voicerender-0.1.1/voicerender/engines/metadata.py +58 -0
- voicerender-0.1.1/voicerender/engines/piper.py +173 -0
- voicerender-0.1.1/voicerender/engines/pipersynth.py +570 -0
- voicerender-0.1.1/voicerender/engines/pocket.py +169 -0
- voicerender-0.1.1/voicerender/engines/pocketsynth.py +1234 -0
- voicerender-0.1.1/voicerender/engines/registry.py +320 -0
- voicerender-0.1.1/voicerender/engines/selection.py +61 -0
- voicerender-0.1.1/voicerender/engines/supertonicsynth.py +707 -0
- voicerender-0.1.1/voicerender/errors.py +161 -0
- voicerender-0.1.1/voicerender/events.py +43 -0
- voicerender-0.1.1/voicerender/handoff.py +62 -0
- voicerender-0.1.1/voicerender/inputs/__init__.py +21 -0
- voicerender-0.1.1/voicerender/inputs/utterplan_v5.py +897 -0
- voicerender-0.1.1/voicerender/lexicons.py +42 -0
- voicerender-0.1.1/voicerender/manifest.py +750 -0
- voicerender-0.1.1/voicerender/models.py +499 -0
- voicerender-0.1.1/voicerender/py.typed +0 -0
- voicerender-0.1.1/voicerender/render.py +365 -0
- voicerender-0.1.1/voicerender/render_v5.py +1193 -0
- voicerender-0.1.1/voicerender/schemas/render-manifest-v2.schema.json +415 -0
- voicerender-0.1.1/voicerender/storage.py +113 -0
- voicerender-0.1.1/voicerender.egg-info/PKG-INFO +254 -0
- voicerender-0.1.1/voicerender.egg-info/SOURCES.txt +95 -0
- voicerender-0.1.1/voicerender.egg-info/dependency_links.txt +1 -0
- voicerender-0.1.1/voicerender.egg-info/entry_points.txt +2 -0
- voicerender-0.1.1/voicerender.egg-info/requires.txt +31 -0
- voicerender-0.1.1/voicerender.egg-info/scm_file_list.json +90 -0
- voicerender-0.1.1/voicerender.egg-info/scm_version.json +8 -0
- voicerender-0.1.1/voicerender.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[codecrate]
|
|
2
|
+
output = "context_voicerender.md"
|
|
3
|
+
keep_docstrings = true
|
|
4
|
+
dedupe = true
|
|
5
|
+
metadata = false
|
|
6
|
+
respect_gitignore = true
|
|
7
|
+
exclude = ["*/.venv/*", "context_voicerender.*"]
|
|
8
|
+
include = [
|
|
9
|
+
"**/*.py",
|
|
10
|
+
"**/*.toml",
|
|
11
|
+
"**/*.md",
|
|
12
|
+
"**/*.json",
|
|
13
|
+
"**/*.txt",
|
|
14
|
+
"**/*.csv",
|
|
15
|
+
"**/*.tsv",
|
|
16
|
+
"**/*.yaml",
|
|
17
|
+
"**/*.yml",
|
|
18
|
+
"**/*.ssmd",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
]
|
|
21
|
+
split_max_chars = 0
|
|
22
|
+
layout = "full"
|
|
23
|
+
profile = "portable-agent"
|
|
24
|
+
emit_standalone_unpacker = true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Codecov
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
coverage:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- name: Set up Python
|
|
12
|
+
uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.12"
|
|
15
|
+
- name: Run tests with coverage
|
|
16
|
+
run: |
|
|
17
|
+
python -m pip install --upgrade pip
|
|
18
|
+
python -m pip install coverage pytest pytest-cov
|
|
19
|
+
python -m pip install -e ".[dev]"
|
|
20
|
+
python -m pytest --cov=utterplan --cov-report=xml --junitxml=junit.xml
|
|
21
|
+
- name: Upload coverage to Codecov
|
|
22
|
+
uses: codecov/codecov-action@v5
|
|
23
|
+
with:
|
|
24
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
25
|
+
- name: Upload test results to Codecov
|
|
26
|
+
if: ${{ !cancelled() }}
|
|
27
|
+
uses: codecov/test-results-action@v1
|
|
28
|
+
with:
|
|
29
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: pre-commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
pre-commit:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.13"
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: "20"
|
|
21
|
+
|
|
22
|
+
- name: Install Python tools
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
python -m pip install "ruff==0.16.0"
|
|
26
|
+
|
|
27
|
+
- name: Install Node tools
|
|
28
|
+
run: |
|
|
29
|
+
npm install -g prettier@2.7.1 @prettier/plugin-xml@2.2.0 eslint
|
|
30
|
+
|
|
31
|
+
- uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Build and publish a Python package when a GitHub Release is published.
|
|
2
|
+
|
|
3
|
+
name: Upload Python Package
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out release
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
|
|
25
|
+
- name: Install build tooling
|
|
26
|
+
run: python -m pip install --upgrade pip build twine
|
|
27
|
+
- name: Build package
|
|
28
|
+
run: |
|
|
29
|
+
rm -rf dist
|
|
30
|
+
python -m build
|
|
31
|
+
- name: Check built distributions
|
|
32
|
+
run: python -m twine check dist/*
|
|
33
|
+
- name: Validate release artifacts
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
36
|
+
run: |
|
|
37
|
+
python - <<'PY'
|
|
38
|
+
import os
|
|
39
|
+
import re
|
|
40
|
+
import zipfile
|
|
41
|
+
from email import policy
|
|
42
|
+
from email.parser import Parser
|
|
43
|
+
from pathlib import Path
|
|
44
|
+
|
|
45
|
+
from packaging.requirements import Requirement
|
|
46
|
+
|
|
47
|
+
tag_version = os.environ["RELEASE_TAG"].removeprefix("v")
|
|
48
|
+
artifacts = list(Path("dist").iterdir())
|
|
49
|
+
wheels = [path for path in artifacts if path.suffix == ".whl"]
|
|
50
|
+
sdists = [path for path in artifacts if path.name.endswith(".tar.gz")]
|
|
51
|
+
assert len(wheels) == 1, wheels
|
|
52
|
+
assert len(sdists) == 1, sdists
|
|
53
|
+
wheel_match = re.fullmatch(r"voicerender-([^-]+)-[^-]+-[^-]+-[^-]+\.whl", wheels[0].name)
|
|
54
|
+
sdist_match = re.fullmatch(r"voicerender-([^-]+)\.tar\.gz", sdists[0].name)
|
|
55
|
+
assert wheel_match is not None, wheels[0]
|
|
56
|
+
assert sdist_match is not None, sdists[0]
|
|
57
|
+
assert wheel_match.group(1) == tag_version, (wheel_match.group(1), tag_version)
|
|
58
|
+
assert sdist_match.group(1) == tag_version, (sdist_match.group(1), tag_version)
|
|
59
|
+
|
|
60
|
+
with zipfile.ZipFile(wheels[0]) as archive:
|
|
61
|
+
metadata_name = next(name for name in archive.namelist() if name.endswith("METADATA"))
|
|
62
|
+
metadata = Parser(policy=policy.default).parsestr(
|
|
63
|
+
archive.read(metadata_name).decode("utf-8")
|
|
64
|
+
)
|
|
65
|
+
assert metadata["Name"] == "voicerender"
|
|
66
|
+
assert metadata["Version"] == tag_version
|
|
67
|
+
requirements = [
|
|
68
|
+
Requirement(value) for value in metadata.get_all("Requires-Dist", [])
|
|
69
|
+
]
|
|
70
|
+
requirement_names = {requirement.name for requirement in requirements}
|
|
71
|
+
assert {"numpy", "soundfile"} <= requirement_names
|
|
72
|
+
names = set(archive.namelist())
|
|
73
|
+
expected = {
|
|
74
|
+
"voicerender/py.typed",
|
|
75
|
+
"voicerender/schemas/render-manifest-v2.schema.json",
|
|
76
|
+
}
|
|
77
|
+
assert expected <= names
|
|
78
|
+
PY
|
|
79
|
+
|
|
80
|
+
- name: Publish package to PyPI
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@v1.14.1
|
|
82
|
+
with:
|
|
83
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
84
|
+
attestations: false
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
name: Run tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_call:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
- name: Install package
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install -e ".[dev]"
|
|
25
|
+
python -m compileall -q voicerender tests
|
|
26
|
+
- name: Run tests
|
|
27
|
+
run: python -m pytest -q
|
|
28
|
+
|
|
29
|
+
quality:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- name: Set up Python
|
|
34
|
+
uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
- name: Install quality tools
|
|
38
|
+
run: |
|
|
39
|
+
python -m pip install --upgrade pip
|
|
40
|
+
python -m pip install -e ".[dev]"
|
|
41
|
+
- name: Run quality checks
|
|
42
|
+
run: |
|
|
43
|
+
ruff check .
|
|
44
|
+
ruff format --check .
|
|
45
|
+
mypy --strict voicerender
|
|
46
|
+
python -m compileall -q voicerender
|
|
47
|
+
|
|
48
|
+
engine-compatibility:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
strategy:
|
|
51
|
+
fail-fast: false
|
|
52
|
+
matrix:
|
|
53
|
+
extra: [kokoro, piper, pocket, kitten, supertonic, inflect]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
- name: Set up Python
|
|
57
|
+
uses: actions/setup-python@v5
|
|
58
|
+
with:
|
|
59
|
+
python-version: "3.12"
|
|
60
|
+
- name: Install engine extra and test tools
|
|
61
|
+
run: |
|
|
62
|
+
python -m pip install --upgrade pip
|
|
63
|
+
python -m pip install -e ".[${{ matrix.extra }}]" pytest
|
|
64
|
+
- name: Run API and adapter contracts without model downloads
|
|
65
|
+
run: python -m pytest -q tests/test_engine_registry.py tests/test_backends.py
|
|
66
|
+
|
|
67
|
+
exact-released-set:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.12"
|
|
75
|
+
- name: Install the pinned released engine set
|
|
76
|
+
run: |
|
|
77
|
+
python -m pip install --upgrade pip pytest
|
|
78
|
+
python -m pip install -e . \
|
|
79
|
+
"pykokoro==0.10.2" \
|
|
80
|
+
"pipersynth==0.2.1" \
|
|
81
|
+
"pocketsynth[cpu]==0.2.5" \
|
|
82
|
+
"kittensynth[cpu]==0.1.1" \
|
|
83
|
+
"supertonicsynth[cpu]==0.1.2" \
|
|
84
|
+
"inflectsynth[cpu]==0.1.1"
|
|
85
|
+
- name: Run released-set compatibility contracts
|
|
86
|
+
run: python -m pytest -q tests/test_engine_registry.py tests/test_backends.py
|
|
87
|
+
|
|
88
|
+
lower-bounds:
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
- name: Set up Python
|
|
93
|
+
uses: actions/setup-python@v5
|
|
94
|
+
with:
|
|
95
|
+
python-version: "3.10"
|
|
96
|
+
- name: Install lower-bound dependencies
|
|
97
|
+
run: |
|
|
98
|
+
python -m pip install --upgrade pip
|
|
99
|
+
python -m pip install \
|
|
100
|
+
"pytest==8.0.0" \
|
|
101
|
+
"numpy==1.23.0" \
|
|
102
|
+
"soundfile==0.12.1" \
|
|
103
|
+
"tomli==2.0.1"
|
|
104
|
+
python -m pip install --no-deps -e .
|
|
105
|
+
- name: Run lower-bound tests
|
|
106
|
+
run: python -m pytest -q
|
|
107
|
+
|
|
108
|
+
package-smoke:
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@v4
|
|
112
|
+
- name: Set up Python
|
|
113
|
+
uses: actions/setup-python@v5
|
|
114
|
+
with:
|
|
115
|
+
python-version: "3.12"
|
|
116
|
+
- name: Build wheel and sdist
|
|
117
|
+
run: |
|
|
118
|
+
python -m pip install --upgrade pip build twine
|
|
119
|
+
python -m build --outdir "$RUNNER_TEMP/dist"
|
|
120
|
+
python -m twine check "$RUNNER_TEMP"/dist/*
|
|
121
|
+
- name: Verify SCM fallback for an untagged source archive
|
|
122
|
+
run: |
|
|
123
|
+
mkdir -p "$RUNNER_TEMP/voicerender-source-archive" "$RUNNER_TEMP/fallback-dist"
|
|
124
|
+
git archive HEAD | tar -x -C "$RUNNER_TEMP/voicerender-source-archive"
|
|
125
|
+
python -m build --wheel \
|
|
126
|
+
--outdir "$RUNNER_TEMP/fallback-dist" \
|
|
127
|
+
"$RUNNER_TEMP/voicerender-source-archive"
|
|
128
|
+
python - "$RUNNER_TEMP/fallback-dist" <<'PY'
|
|
129
|
+
import sys
|
|
130
|
+
from email import policy
|
|
131
|
+
from email.parser import Parser
|
|
132
|
+
from pathlib import Path
|
|
133
|
+
from zipfile import ZipFile
|
|
134
|
+
|
|
135
|
+
wheel = next(Path(sys.argv[1]).glob("voicerender-*.whl"))
|
|
136
|
+
with ZipFile(wheel) as archive:
|
|
137
|
+
metadata_name = next(
|
|
138
|
+
name for name in archive.namelist() if name.endswith("METADATA")
|
|
139
|
+
)
|
|
140
|
+
metadata = Parser(policy=policy.default).parsestr(
|
|
141
|
+
archive.read(metadata_name).decode("utf-8")
|
|
142
|
+
)
|
|
143
|
+
assert metadata["Version"] == "0+unknown", metadata["Version"]
|
|
144
|
+
PY
|
|
145
|
+
- name: Verify package contents
|
|
146
|
+
run: |
|
|
147
|
+
python - <<'PY'
|
|
148
|
+
import os
|
|
149
|
+
import tarfile
|
|
150
|
+
from email import policy
|
|
151
|
+
from email.parser import Parser
|
|
152
|
+
from pathlib import Path
|
|
153
|
+
from zipfile import ZipFile
|
|
154
|
+
|
|
155
|
+
from packaging.requirements import Requirement
|
|
156
|
+
|
|
157
|
+
artifacts = Path(os.environ["RUNNER_TEMP"]) / "dist"
|
|
158
|
+
wheel = next(artifacts.glob("voicerender-*.whl"))
|
|
159
|
+
sdist = next(artifacts.glob("voicerender-*.tar.gz"))
|
|
160
|
+
expected = {
|
|
161
|
+
"voicerender/py.typed",
|
|
162
|
+
"voicerender/schemas/render-manifest-v2.schema.json",
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
with ZipFile(wheel) as archive:
|
|
166
|
+
names = set(archive.namelist())
|
|
167
|
+
assert expected <= names
|
|
168
|
+
metadata_name = next(name for name in names if name.endswith("METADATA"))
|
|
169
|
+
metadata = Parser(policy=policy.default).parsestr(
|
|
170
|
+
archive.read(metadata_name).decode("utf-8")
|
|
171
|
+
)
|
|
172
|
+
requirements = {
|
|
173
|
+
Requirement(value).name
|
|
174
|
+
for value in metadata.get_all("Requires-Dist", [])
|
|
175
|
+
}
|
|
176
|
+
assert {"numpy", "soundfile"} <= requirements
|
|
177
|
+
base_requirements = set()
|
|
178
|
+
for value in metadata.get_all("Requires-Dist", []):
|
|
179
|
+
requirement = Requirement(value)
|
|
180
|
+
if (
|
|
181
|
+
requirement.marker is None
|
|
182
|
+
or requirement.marker.evaluate({"extra": ""})
|
|
183
|
+
):
|
|
184
|
+
base_requirements.add(requirement.name.lower())
|
|
185
|
+
engine_sdks = {
|
|
186
|
+
"inflectsynth", "kittensynth", "pykokoro", "pipersynth",
|
|
187
|
+
"pocketsynth", "supertonicsynth",
|
|
188
|
+
}
|
|
189
|
+
assert not engine_sdks & base_requirements
|
|
190
|
+
assert not {"audiocompose", "readio"} & {name.lower() for name in requirements}
|
|
191
|
+
|
|
192
|
+
with tarfile.open(sdist, "r:gz") as archive:
|
|
193
|
+
names = archive.getnames()
|
|
194
|
+
assert all(any(name.endswith(resource) for name in names) for resource in expected)
|
|
195
|
+
PY
|
|
196
|
+
- name: Install wheel in clean environment
|
|
197
|
+
run: |
|
|
198
|
+
python -m venv "$RUNNER_TEMP/voicerender-wheel-venv"
|
|
199
|
+
"$RUNNER_TEMP/voicerender-wheel-venv/bin/python" -m pip install \
|
|
200
|
+
"$RUNNER_TEMP"/dist/voicerender-*.whl
|
|
201
|
+
- name: Run installed base smoke checks
|
|
202
|
+
working-directory: ${{ runner.temp }}
|
|
203
|
+
run: |
|
|
204
|
+
VENV="$RUNNER_TEMP/voicerender-wheel-venv"
|
|
205
|
+
"$VENV/bin/python" - <<'PY'
|
|
206
|
+
import importlib.metadata as metadata
|
|
207
|
+
import importlib.resources as resources
|
|
208
|
+
import sys
|
|
209
|
+
|
|
210
|
+
import voicerender
|
|
211
|
+
from voicerender import list_engines
|
|
212
|
+
|
|
213
|
+
assert metadata.version("voicerender") == voicerender.__version__
|
|
214
|
+
assert resources.files("voicerender").joinpath("py.typed").is_file()
|
|
215
|
+
assert resources.files("voicerender").joinpath("schemas/render-manifest-v2.schema.json").is_file()
|
|
216
|
+
assert len(list_engines()) == 6
|
|
217
|
+
assert not any(
|
|
218
|
+
name.split(".", 1)[0] in {
|
|
219
|
+
"inflectsynth", "kittensynth", "pykokoro", "pipersynth",
|
|
220
|
+
"pocketsynth", "supertonicsynth",
|
|
221
|
+
}
|
|
222
|
+
for name in sys.modules
|
|
223
|
+
)
|
|
224
|
+
PY
|
|
225
|
+
"$VENV/bin/voicerender" --version
|
|
226
|
+
"$VENV/bin/voicerender" engines list --json
|
|
227
|
+
- name: Smoke-test the installed Piper extra
|
|
228
|
+
working-directory: ${{ runner.temp }}
|
|
229
|
+
run: |
|
|
230
|
+
VENV="$RUNNER_TEMP/voicerender-wheel-venv"
|
|
231
|
+
WHEEL="$(find "$RUNNER_TEMP/dist" -maxdepth 1 -name 'voicerender-*.whl' -print -quit)"
|
|
232
|
+
"$VENV/bin/python" -m pip install "${WHEEL}[piper]"
|
|
233
|
+
"$VENV/bin/voicerender" engines inspect piper
|
|
234
|
+
docs:
|
|
235
|
+
runs-on: ubuntu-latest
|
|
236
|
+
steps:
|
|
237
|
+
- uses: actions/checkout@v4
|
|
238
|
+
- name: Set up Python
|
|
239
|
+
uses: actions/setup-python@v5
|
|
240
|
+
with:
|
|
241
|
+
python-version: "3.12"
|
|
242
|
+
- name: Install documentation dependencies
|
|
243
|
+
run: |
|
|
244
|
+
python -m pip install --upgrade pip
|
|
245
|
+
python -m pip install -r docs/requirements.txt
|
|
246
|
+
- name: Build documentation
|
|
247
|
+
run: sphinx-build -W --keep-going -D master_doc=utterplan-v5-integration -b html docs docs/_build/html
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
voicerender/_version.py
|
|
222
|
+
context_voicerender*.*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
schema_version = 3
|
|
2
|
+
|
|
3
|
+
[project]
|
|
4
|
+
uuid = "c801dfa2-85a1-498d-930b-bae570286fce"
|
|
5
|
+
name = "voicerender"
|
|
6
|
+
|
|
7
|
+
[ledgers.taskledger.mounts.data]
|
|
8
|
+
storage = "external"
|
|
9
|
+
root = "../ledger"
|
|
10
|
+
|
|
11
|
+
[ledgers.taskledger.mounts.runtime]
|
|
12
|
+
storage = "user-data"
|
|
13
|
+
|
|
14
|
+
[ledgers.taskledger.mounts.logs]
|
|
15
|
+
storage = "user-data"
|
|
16
|
+
|
|
17
|
+
[ledgers.taskledger.mounts.indexes]
|
|
18
|
+
storage = "cache"
|
|
19
|
+
|
|
20
|
+
[ledgers.releaseledger.mounts.data]
|
|
21
|
+
storage = "project"
|
|
22
|
+
|
|
23
|
+
[ledgers.releaseledger.mounts.indexes]
|
|
24
|
+
storage = "cache"
|