VOICEVOX ENGINE is an open-source project. This project is actively developed, and its results are reflected in the production version of VOICEVOX. VOICEVOX ENGINE welcomes contributions from the community.
This guide provides information to assist contributors, including development policies, pull request procedures, and review processes.
You can check the guidelines for VOICEVOX ENGINE policies from the following:
- Development Governance
- Versioning
- Branch Strategy
- Pull Requests
- Reviews
- Bugs
- Feature Improvements
- Static Analysis
- Tests
- License
You can check the guidelines according to the contributor's purpose from the following:
- Submitting a Pull Request
- Bugs
- Feature Improvements
- Setting Up the Environment
- Running the Code
You can check frequently used commands for development from the following:
- Installing Dependencies
- Running Without Voice Library
- Packages
- Static Analysis
- Tests
VOICEVOX ENGINE conducts open development based on GitHub.
We accept feature requests, bug reports, and questions from the community through GitHub Issues. We also welcome pull requests. When creating a pull request to resolve an issue, we recommend either informing on the issue side that you've started working on it, or initially creating a Draft pull request to avoid working on the same issue as someone else.
To facilitate more casual development, we have discussions and chats on the VOICEVOX Unofficial Discord Server. Feel free to join us.
We adopt semantic versioning.
At this stage, the major version is 0, and we allow minor updates that include breaking changes. We update the minor version for major feature additions and changes, and the patch version for bug fixes and character additions.
You can check the summary of changes for each version in the Releases.
We adopt GitHub Flow with release branches as our branch strategy.
Pull requests are basically merged into the master
branch. As an exception, at the time of updating the production version of VOICEVOX, a release branch release-X.Y
is prepared, temporarily branching from master
. Commits necessary for the release are made to release-X.Y
, and releases are made from this branch. Hotfixes immediately after release are first merged into release-X.Y
, and after the release, the entire branch is merged into master
.
All code changes are made through pull requests.
Pull requests are managed collectively on GitHub Pull requests and merged after review. VOICEVOX ENGINE welcomes pull requests from the community.
You can create a pull request by following these steps:
- Set up the development environment
- Fork this repository and create a branch for your pull request from the
master
branch - Install the dependencies
- (Optional) Install the voice library
- Edit the code
- Run static analysis in batch (Type checking, Linting, Formatting)
- Test the code
- Push the branch to remote and create a pull request to this repository
All pull requests are merged after review.
Reviews are conducted openly on GitHub Pull requests, and anyone in the community can participate in the form of comments. After review, it will be merged into the master
(or release-X.Y
) branch. Merging requires approval from the VOICEVOX team.
We use GitHub Issues to centrally manage bugs.
You can access the list of known bugs by filtering with the bug
label. The status of bug fixes can be checked in each bug's issue.
If you find a bug that is not in the list of known bugs (new bug), you can report it on GitHub Issues. VOICEVOX ENGINE welcomes reports of new bugs.
Bug fixes are discussed on the Issue and fixed using pull requests. The procedure for creating a pull request is guided in "Submitting a Pull Request". VOICEVOX ENGINE welcomes pull requests that fix bugs.
We use GitHub Issues to centrally manage feature improvements.
You can access the list of new feature additions and specification changes by filtering with the feature improvement
label. The implementation status of feature improvements can be checked in each feature improvement's issue.
If you have a feature improvement proposal that is not in the existing proposal list, you can propose it on GitHub Issues. VOICEVOX ENGINE welcomes feature improvement proposals.
Feature improvements are discussed on the Issue and implemented using pull requests. The procedure for creating a pull request is guided in "Submitting a Pull Request". VOICEVOX ENGINE welcomes pull requests that implement feature improvements.
It is developed using Python 3.11.9
.
To install, you will need C/C++ compilers and CMake for each OS.
You can install the dependencies by running the following commands in the shell:
# Install execution, development, and test environments
python -m pip install -r requirements.txt -r requirements-dev.txt -r requirements-build.txt
# Install git hook
pre-commit install -t pre-push
The OSS version of VOICEVOX ENGINE does not include the voice library of the product version of VOICEVOX, so voice synthesis is a mock version.
The voice library of the product version of VOICEVOX can be installed by following the terms of use and using one of the following procedures. This allows you to synthesize product version character voices such as "Zundamon".
The voice library can be installed using one of the following procedures:
You can use the voice library by installing the product version of VOICEVOX.
Please follow the VOICEVOX official website to install the software.
You can use the voice library by installing the product version of VOICEVOX CORE.
The necessary files will be prepared by the following commands:
# Define variables for CORE variation (e.g., VOICEVOX CORE v0.15.0 CPU version for x64 Linux machines)
VERSION="0.15.0"; OS="linux"; ARCHITECTURE="x64"; PROCESSOR="cpu";
# Download and extract CORE
CORENAME="voicevox_core-${OS}-${ARCHITECTURE}-${PROCESSOR}-${VERSION}"
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${VERSION}/${CORENAME}.zip" -o "${CORENAME}.zip"
unzip "${CORENAME}.zip"
The CORE variation variables can be specified with the following values:
VERSION
: voicevox_core version (e.g.,0.15.0
)OS
: OS type (windows
|osx
|linux
)ARCHITECTURE
: CPU architecture (x86
|x64
|arm64
)PROCESSOR
: Processor type (cpu
|gpu
|cuda
|directml
)
The latest release can be found here.
Running VOICEVOX ENGINE will start an HTTP server.
Check the details of command-line arguments with the following command:
python run.py --help
If you haven't installed the voice library or want to use lightweight mock voice synthesis, you can run the engine by executing the following command in the shell:
python run.py --enable_mock
VOICEVOX_DIR="C:/path/to/VOICEVOX/vv-engine" # Path to ENGINE in the product version VOICEVOX directory
python run.py --voicevox_dir=$VOICEVOX_DIR
VOICELIB_DIR_1="C:/path/to/core_1"; VOICELIB_DIR_2="C:/path/to/core_2"; # Path to the product version VOICEVOX CORE directory
python run.py --voicelib_dir=$VOICELIB_DIR_1 --voicelib_dir=$VOICELIB_DIR_2
python run.py --output_log_utf8
# or
VV_OUTPUT_LOG_UTF8=1 python run.py
We manage packages using poetry
. We also generate requirements-*.txt
files for pip
users.
Dependency packages must have licenses that "do not conflict with the voice library's license even when integrated with the voice library through building".
The acceptability of major licenses is as follows:
- MIT/Apache/BSD-3: OK
- LGPL: OK (because it's dynamically separated from the core)
- GPL: Not OK (because it requires disclosure of all related code)
poetry add `package_name`
poetry add --group dev `package_name` # Adding development dependencies
poetry add --group build `package_name` # Adding build dependencies
poetry update `package_name`
poetry update # Update all
poetry export --without-hashes -o requirements.txt # If you update this, you need to update the two below as well.
poetry export --without-hashes --with dev -o requirements-dev.txt
poetry export --without-hashes --with build -o requirements-build.txt
We employ type checking.
The goal is to improve safety, and we use mypy
as the checker.
For running type checks, refer to the "Running Static Analysis in Batch" section.
We employ automatic linting.
The goal is to improve safety, and we use flake8
and isort
as linters.
For running linters, refer to the "Running Static Analysis in Batch" section.
We employ automatic code formatting.
The goal is to improve readability, and we use black
as the formatter.
For running the formatter, refer to the "Running Static Analysis in Batch" section.
Note that we currently do not employ automatic document formatting. Maintainers periodically format using prettier
.
We employ typo checking.
The goal is to improve readability, and we use typos
as the checker. If there are false positives or files that should be excluded from checking, please edit pyproject.toml
according to the configuration file explanation.
For local installation of typos
, please refer to the official documentation according to your environment. If local installation is difficult, please refer to the results of typos
automatically executed by GitHub Actions during pull requests.
Execute the following command in the shell to check for typos:
typos
Execute the following command in the shell to run static analysis (type checking, linting, formatting) in batch.
Automatic corrections will be made where possible.
pysen run format lint
We employ automated testing.
To aim for long-term stable development, we have enriched both unit tests and End-to-End tests, and we also adopt snapshot tests to guarantee the invariance of values. We use pytest
as the test runner.
Execute the following command in the shell to run tests:
python -m pytest
When code changes alter expected output values, it may be necessary to update snapshots.
Execute the following command in the shell to update snapshots:
python -m pytest --snapshot-update
We ensure the safety of dependency packages through vulnerability diagnosis using safety
.
Execute the following command in the shell to diagnose vulnerabilities:
safety check -r requirements.txt -r requirements-dev.txt -r requirements-build.txt
The build created by this method differs from what is publicly released. Also, for GPU usage, additional libraries such as cuDNN, CUDA, or DirectML are required.
OUTPUT_LICENSE_JSON_PATH=licenses.json \
bash tools/create_venv_and_generate_licenses.bash
# For mock build
pyinstaller --noconfirm run.spec
# For product version build
CORE_MODEL_DIR_PATH="/path/to/core_model" \
LIBCORE_PATH="/path/to/libcore" \
LIBONNXRUNTIME_PATH="/path/to/libonnxruntime" \
pyinstaller --noconfirm run.spec
TODO: Describe Docker version build procedure based on GitHub Actions
You can build by turning on Actions in your forked repository and triggering build-engine-package.yml
with workflow_dispatch.
The artifacts will be uploaded to Releases.
The API Documentation (actual file is docs/api/index.html
) is automatically updated.
You can manually create the API documentation with the following command:
PYTHONPATH=. python tools/make_docs.py
name | description |
---|---|
DOCKERHUB_USERNAME | Docker Hub username |
name | description |
---|---|
DOCKERHUB_TOKEN | Docker Hub access token |
Please report bugs, feature requests, improvement suggestions, and questions in the Issue section.
VOICEVOX ENGINE organizes issue status transitions as follows:
Each status corresponds to a GitHub status: XX
label (e.g., status: seeking implementer
).
---
title: Issue Status Transition Diagram v1.0
---
stateDiagram-v2
[*] --> NecessityDiscussion : issue open
state opened {
NecessityDiscussion --> Design
Design --> SeekingImplementer
SeekingImplementer --> Implementation : Start declaration
}
opened --> not_planned : NoGo decision
not_planned --> [*] : issue close
Implementation --> resolved : Pull request merge
resolved --> [*] : issue close
opened --> Roadmap : Stagnation
Roadmap --> opened
NOTE: The decision to roadmap should be made when an issue has stagnated for 30 days in NecessityDiscussion
, or 180 days in Design
, SeekingImplementer
, or Implementation
. Support should also be considered during Implementation
stagnation.
This is a dual license of LGPL v3 and another license that does not require source code disclosure.
If you want to obtain the other license, please contact Hiho.
X account: @hiho_karuta