vv-synth 0.1.0__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.
- vv_synth-0.1.0/.gitignore +46 -0
- vv_synth-0.1.0/.python-version +1 -0
- vv_synth-0.1.0/AGENTS.md +53 -0
- vv_synth-0.1.0/CLAUDE.md +14 -0
- vv_synth-0.1.0/CONTRIBUTING.md +110 -0
- vv_synth-0.1.0/LICENSE +21 -0
- vv_synth-0.1.0/PKG-INFO +490 -0
- vv_synth-0.1.0/README.ja.md +464 -0
- vv_synth-0.1.0/README.md +465 -0
- vv_synth-0.1.0/SECURITY.md +38 -0
- vv_synth-0.1.0/main.py +131 -0
- vv_synth-0.1.0/pyproject.toml +178 -0
- vv_synth-0.1.0/tests/__init__.py +1 -0
- vv_synth-0.1.0/tests/test_cli.py +217 -0
- vv_synth-0.1.0/tests/test_engine_client.py +250 -0
- vv_synth-0.1.0/tests/test_output_paths.py +59 -0
- vv_synth-0.1.0/uv.lock +206 -0
- vv_synth-0.1.0/vv_synth/__init__.py +3 -0
- vv_synth-0.1.0/vv_synth/engine_client.py +168 -0
- vv_synth-0.1.0/vv_synth/output_paths.py +52 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Local environment / secret files
|
|
13
|
+
.env
|
|
14
|
+
.env.*
|
|
15
|
+
|
|
16
|
+
# macOS metadata
|
|
17
|
+
.DS_Store
|
|
18
|
+
|
|
19
|
+
# Tool caches
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
|
|
22
|
+
# VOICEVOX CORE (run ./download in project root)
|
|
23
|
+
download
|
|
24
|
+
voicevox_core/
|
|
25
|
+
|
|
26
|
+
# VOICEVOX Engine official binaries / extracted distributions
|
|
27
|
+
voicevox_engine*/
|
|
28
|
+
*.7z
|
|
29
|
+
*.7z.*
|
|
30
|
+
*.vvpp
|
|
31
|
+
|
|
32
|
+
# Artifacts such as synthesized audio (track only .gitkeep)
|
|
33
|
+
output/*
|
|
34
|
+
!output/.gitkeep
|
|
35
|
+
|
|
36
|
+
# Synthesized audio written anywhere outside output/
|
|
37
|
+
*.wav
|
|
38
|
+
|
|
39
|
+
# Local agent / editor project metadata
|
|
40
|
+
.serena/
|
|
41
|
+
|
|
42
|
+
# Claude Code per-user local settings
|
|
43
|
+
.claude/settings.local.json
|
|
44
|
+
|
|
45
|
+
# Local Claude Code skill copies (canonical skills live in skills/)
|
|
46
|
+
.claude/skills/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
vv_synth-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# vv-synth — Agent Guide
|
|
2
|
+
|
|
3
|
+
`vv-synth` is a thin Typer CLI for VOICEVOX Engine: it sends text to a separately prepared
|
|
4
|
+
Engine over HTTP (default `http://127.0.0.1:50021`) and writes a WAV file. Package: `vv-synth`;
|
|
5
|
+
library: `vv_synth/`; entry point: `main:main`. Keep changes small and the CLI thin.
|
|
6
|
+
|
|
7
|
+
This repository is open source (MIT). Do **not** vendor VOICEVOX Engine, voice libraries,
|
|
8
|
+
model files, binaries, Docker images, or generated WAV files (see
|
|
9
|
+
[`.claude/rules/terms.md`](.claude/rules/terms.md)).
|
|
10
|
+
|
|
11
|
+
User-facing docs: [`README.md`](README.md) (English; source of truth for the Mermaid diagrams
|
|
12
|
+
and maintenance) and [`README.ja.md`](README.ja.md) (Japanese).
|
|
13
|
+
|
|
14
|
+
## Recommended agents
|
|
15
|
+
|
|
16
|
+
Development is set up for **Codex CLI** and **Claude Code**. This `AGENTS.md` is the shared
|
|
17
|
+
entry both read: Codex auto-loads it, and Claude Code reads it via [`CLAUDE.md`](CLAUDE.md).
|
|
18
|
+
Claude Code additionally auto-loads `.claude/rules/*.md` natively — the always-on rules
|
|
19
|
+
(`commit`, `security`, `terms`) every session, and the path-scoped rules when you edit matching
|
|
20
|
+
files; Codex and other agents read them on demand from the index below.
|
|
21
|
+
|
|
22
|
+
## Rules index
|
|
23
|
+
|
|
24
|
+
Detailed rules live in [`.claude/rules/`](.claude/rules/). Read the one that matches your change:
|
|
25
|
+
|
|
26
|
+
| File | Contents |
|
|
27
|
+
|------|----------|
|
|
28
|
+
| [`commit.md`](.claude/rules/commit.md) | Commit message format and prefixes |
|
|
29
|
+
| [`coding.md`](.claude/rules/coding.md) | Python 3.14, ruff/ty, English `--help`, one-line errors |
|
|
30
|
+
| [`architecture.md`](.claude/rules/architecture.md) | Module responsibilities and synthesis flow |
|
|
31
|
+
| [`workflow.md`](.claude/rules/workflow.md) | uv, quality checks, Engine setup, smoke test |
|
|
32
|
+
| [`docs.md`](.claude/rules/docs.md) | README/Mermaid/skills sync, MD placement |
|
|
33
|
+
| [`terms.md`](.claude/rules/terms.md) | VOICEVOX terms, no-vendoring, credit |
|
|
34
|
+
| [`security.md`](.claude/rules/security.md) | Secret files and hardcoding |
|
|
35
|
+
|
|
36
|
+
## Quick reference
|
|
37
|
+
|
|
38
|
+
```shell
|
|
39
|
+
uv sync --group dev
|
|
40
|
+
uv run ruff check . && uv run ruff format . && uv run ty check && uv run pytest
|
|
41
|
+
uv run vv-synth "Test" # Engine must be running on :50021
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Global CLI: `uv tool install --editable .`. Engine setup (Docker / Windows GPU / binary) is in
|
|
45
|
+
[README.md](README.md#prepare-voicevox-engine).
|
|
46
|
+
|
|
47
|
+
## Skills
|
|
48
|
+
|
|
49
|
+
- [`skills/vv-synth/`](skills/vv-synth/) — portable TTS for other projects
|
|
50
|
+
- [`skills/vv-synth-dev/`](skills/vv-synth-dev/) — developing this repository
|
|
51
|
+
- [`skills/README.md`](skills/README.md) — install and publish
|
|
52
|
+
|
|
53
|
+
Commit only when the user explicitly asks ([`.claude/rules/commit.md`](.claude/rules/commit.md)).
|
vv_synth-0.1.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# vv-synth — Claude Code
|
|
2
|
+
|
|
3
|
+
Claude Code reads this file. The shared agent guide is imported from [`AGENTS.md`](AGENTS.md)
|
|
4
|
+
below; Claude-specific notes follow.
|
|
5
|
+
|
|
6
|
+
@AGENTS.md
|
|
7
|
+
|
|
8
|
+
## Claude Code notes
|
|
9
|
+
|
|
10
|
+
- Claude Code auto-loads [`.claude/rules/`](.claude/rules/) natively: `commit.md`, `security.md`,
|
|
11
|
+
and `terms.md` every session, and the path-scoped `coding.md` / `architecture.md` /
|
|
12
|
+
`workflow.md` / `docs.md` when you edit files they target (`paths:` frontmatter).
|
|
13
|
+
- `README.md` is the source of truth for implementation detail and the two Mermaid diagrams.
|
|
14
|
+
- Commit only when the user explicitly asks ([`.claude/rules/commit.md`](.claude/rules/commit.md)).
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Contributing to vv-synth
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in `vv-synth`. It is a thin Typer CLI that sends text to a
|
|
4
|
+
separately prepared VOICEVOX Engine over HTTP and writes a local WAV file. Please keep
|
|
5
|
+
changes small and focused.
|
|
6
|
+
|
|
7
|
+
## Code of Conduct
|
|
8
|
+
|
|
9
|
+
This project follows the [Contributor Covenant Code of Conduct](.github/CODE_OF_CONDUCT.md). By participating, you are expected to uphold it.
|
|
10
|
+
|
|
11
|
+
## Scope and philosophy
|
|
12
|
+
|
|
13
|
+
- `vv-synth` only talks to the Engine HTTP API (`http://127.0.0.1:50021` by default).
|
|
14
|
+
- Do **not** vendor VOICEVOX Engine, voice libraries, model files, official binaries,
|
|
15
|
+
Docker images, or generated WAV files. They must never be committed.
|
|
16
|
+
- Prefer editing existing modules over adding new abstractions. Avoid out-of-scope
|
|
17
|
+
refactors and large test additions unless they are requested.
|
|
18
|
+
|
|
19
|
+
The runtime logic lives in three files:
|
|
20
|
+
|
|
21
|
+
| Path | Responsibility |
|
|
22
|
+
|------|----------------|
|
|
23
|
+
| `main.py` | Typer CLI and the `vv-synth` entry point |
|
|
24
|
+
| `vv_synth/engine_client.py` | Engine HTTP calls, speech rate, WAV saving |
|
|
25
|
+
| `vv_synth/output_paths.py` | Output path resolution (`output/`, `-o`, timestamps) |
|
|
26
|
+
|
|
27
|
+
## Development setup
|
|
28
|
+
|
|
29
|
+
Requires Python 3.14+ and [uv](https://docs.astral.sh/uv/).
|
|
30
|
+
|
|
31
|
+
```shell
|
|
32
|
+
uv sync --group dev
|
|
33
|
+
uv run vv-synth --help
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Start the VOICEVOX Engine with Docker or an official binary, then confirm it responds:
|
|
37
|
+
|
|
38
|
+
```shell
|
|
39
|
+
docker run --rm -it -p '127.0.0.1:50021:50021' voicevox/voicevox_engine:cpu-latest
|
|
40
|
+
curl -sSf http://127.0.0.1:50021/version
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
See [README.md](README.md#prepare-voicevox-engine) for full Engine setup (CPU, Windows GPU,
|
|
44
|
+
official binaries) and troubleshooting.
|
|
45
|
+
|
|
46
|
+
## Quality checks
|
|
47
|
+
|
|
48
|
+
Run these before opening a pull request:
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
uv run ruff check .
|
|
52
|
+
uv run ruff format .
|
|
53
|
+
uv run ty check
|
|
54
|
+
uv run pytest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`pytest` runs the suite in `tests/` and does not require a running VOICEVOX Engine
|
|
58
|
+
(network calls are mocked).
|
|
59
|
+
|
|
60
|
+
Manual smoke test with the Engine running:
|
|
61
|
+
|
|
62
|
+
```shell
|
|
63
|
+
uv run vv-synth "contribution smoke test"
|
|
64
|
+
ls -la output/
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Coding conventions
|
|
68
|
+
|
|
69
|
+
- Strict `ruff` (`select = ["ALL"]`) and `ty` settings are defined in `pyproject.toml`.
|
|
70
|
+
- Relative imports are banned; use absolute imports.
|
|
71
|
+
- Keep `vv-synth --help` text in **English**. Japanese user-facing prose belongs in
|
|
72
|
+
`README.ja.md`.
|
|
73
|
+
- Synthesis errors must be a **single English line** on stderr (exit code 1). Do not expose
|
|
74
|
+
tracebacks to users.
|
|
75
|
+
- Print `INFO: wrote <absolute-path>` to stdout on success. Argument and option parsing
|
|
76
|
+
errors use Typer's usage error on stderr (exit code 2).
|
|
77
|
+
- CLI speech rates must be finite numbers from `0.01` to `10.0`.
|
|
78
|
+
- Keep business logic in `vv_synth/`; `main.py` stays CLI-only.
|
|
79
|
+
|
|
80
|
+
## Documentation sync
|
|
81
|
+
|
|
82
|
+
When module boundaries, Engine APIs, or the CLI flow change, update the two Mermaid diagrams
|
|
83
|
+
in `README.md` and keep these in sync as needed:
|
|
84
|
+
|
|
85
|
+
- `README.ja.md` (Japanese user docs)
|
|
86
|
+
- `AGENTS.md` and `CLAUDE.md` (agent guidance)
|
|
87
|
+
- Agent Skills: `skills/vv-synth/SKILL.md`, `skills/vv-synth-dev/SKILL.md`
|
|
88
|
+
|
|
89
|
+
The full checklist lives in [README.md](README.md#documentation-sync-checklist).
|
|
90
|
+
|
|
91
|
+
## Commit and pull request style
|
|
92
|
+
|
|
93
|
+
- Use a single-line English message: `prefix: message`.
|
|
94
|
+
- Prefixes: `feat`, `fix`, `docs`, `chore`, `update`, `refactor`, `test`, `style`.
|
|
95
|
+
- Examples: `feat: add --pitch option`, `docs: update engine setup`.
|
|
96
|
+
- Keep each pull request scoped to one logical change.
|
|
97
|
+
- Never commit `output/*.wav`, `voicevox_core/`, `download`, Engine binaries, models, voice
|
|
98
|
+
libraries, or virtual environments.
|
|
99
|
+
|
|
100
|
+
## VOICEVOX terms
|
|
101
|
+
|
|
102
|
+
Generated audio is subject to the latest official VOICEVOX terms and each voice library /
|
|
103
|
+
speaker's own terms, including credit requirements. Before sharing or redistributing any
|
|
104
|
+
generated audio, confirm the applicable terms. See
|
|
105
|
+
[OSS Publication And VOICEVOX Terms](README.md#oss-publication-and-voicevox-terms).
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
By contributing, you agree that your contributions will be licensed under the
|
|
110
|
+
[MIT License](LICENSE).
|
vv_synth-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ru-461
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|