Metadata-Version: 2.4
Name: airunner-tts-vendor
Version: 0.1.0
Summary: Vendored MeloTTS and OpenVoice forks used by AI Runner's TTS pipeline
Author: Capsize LLC
License-Expression: MIT
Project-URL: Homepage, https://github.com/Capsize-Games/airunner-tts-vendor
Project-URL: Source, https://github.com/Capsize-Games/airunner-tts-vendor
Project-URL: Used by, https://github.com/Capsize-Games/airunner
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: numpy==2.2.5
Requires-Dist: librosa==0.11.0
Requires-Dist: pydub==0.25.1
Requires-Dist: wavmark==0.0.3
Requires-Dist: eng_to_ipa==0.0.2
Requires-Dist: inflect==7.5.0
Requires-Dist: unidecode==1.4.0
Requires-Dist: langid==1.1.6
Requires-Dist: txtsplit==1.0.0
Requires-Dist: num2words==0.5.14
Requires-Dist: g2p_en==2.1.0
Requires-Dist: anyascii==0.3.2
Requires-Dist: loguru==0.7.3
Provides-Extra: ml
Requires-Dist: torch==2.13.0+cu129; extra == "ml"
Requires-Dist: torchaudio==2.11.0+cu129; extra == "ml"
Requires-Dist: transformers==5.8.1; extra == "ml"
Provides-Extra: zh
Requires-Dist: pypinyin==0.54.0; extra == "zh"
Requires-Dist: jieba==0.42.1; extra == "zh"
Requires-Dist: cn2an==0.5.23; extra == "zh"
Provides-Extra: jp
Requires-Dist: unidic_lite==1.0.8; extra == "jp"
Requires-Dist: unidic==1.1.0; extra == "jp"
Requires-Dist: mecab-python3==1.0.10; extra == "jp"
Requires-Dist: fugashi==1.4.0; extra == "jp"
Requires-Dist: pykakasi==2.3.0; extra == "jp"
Provides-Extra: kr
Requires-Dist: jamo==0.4.1; extra == "kr"
Requires-Dist: python-mecab-ko==1.3.7; extra == "kr"
Requires-Dist: python-mecab-ko-dic==2.1.1.post2; extra == "kr"
Provides-Extra: tw
Requires-Dist: g2pkk>=0.1.2; extra == "tw"
Provides-Extra: gruut
Requires-Dist: gruut[de,es,fr]==2.4.0; extra == "gruut"
Requires-Dist: networkx==3.4.2; extra == "gruut"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-timeout; extra == "dev"

# airunner-tts-vendor

Vendored [MeloTTS](https://github.com/myshell-ai/MeloTTS) and
[OpenVoice](https://github.com/myshell-ai/OpenVoice) forks used by the
TTS pipeline in
[Capsize-Games/airunner](https://github.com/Capsize-Games/airunner)
(AI Runner). This is third-party code, kept in its own repository
rather than a subdirectory of `airunner-services` specifically so its
licensing and upstream provenance stay physically separate from that
GPL-3.0 distribution's own code, and so upstream diffs stay legible.

## Licensing

Both `melo/` and `openvoice/` are separately MIT-licensed by their
respective upstream projects. See `melo/LICENSE` and
`openvoice/LICENSE` for the exact upstream copyright notices; neither
this package as a whole nor Capsize LLC's own integration changes
relicense either subtree. This repository does not carry a top-level
`LICENSE` file that would override either subtree's own.

## Provenance

Extracted from `Capsize-Games/airunner` at commit `b57cb8e3d`
(2026-09-17), as issue
[#2195](https://github.com/Capsize-Games/airunner/issues/2195), part
of the repository-split tracker
[#2185](https://github.com/Capsize-Games/airunner/issues/2185).
History for the moved files is preserved (`git filter-repo`).

Each subtree's own README documents its upstream project and
whichever pin information issue
[#2190](https://github.com/Capsize-Games/airunner/issues/2190) could
establish for it -- see `melo/README.md` and `openvoice/README.md`.
Neither README names an exact upstream commit; both were vendored
from the upstream project's `main` branch at the time of integration
(issue #2051 in the source repository) without recording the specific
commit. That is a real gap, not an oversight being papered over here:
if an exact upstream fork point is ever needed (for issue #2113 in
the source repository, the dependency/model license inventory, or for
comparing against a specific upstream release), it is not currently
determinable from this repository's history and would need to be
reconstructed by diffing against the upstream projects directly.

## Local modifications

Both forks were decoupled from the application they used to live
beside (issue [#2190](https://github.com/Capsize-Games/airunner/issues/2190),
before this extraction): no import here reaches into `airunner`,
`airunner_common`, or `airunner_services`. Where the fork previously
needed something app-specific (a language enum, a model storage path,
a cache directory, the application's GPU-memory-clearing helper), it
now either defines its own equivalent (`melo/language.py`,
`openvoice/language.py`) or exposes an injectable resolver/hook that
the host process registers at startup
(`set_tts_model_root_resolver`, `set_tts_model_base_resolver`,
`set_cache_base_resolver`, `set_memory_cleanup_hook` in
`melo/runtime_support.py` and `melo/api.py`) -- see each subtree's own
README for the full list.

**Do not reformat, restyle, or lint-fix the vendored code.** The value
of keeping it in its own repository is that upstream diffs stay
readable; a formatting pass defeats that on day one.

## Install

The base install has no torch dependency at all -- `melo/api.py` and
`openvoice/api.py` need torch to *import*, but installing this
package does not require it, since torch needs an explicit
`--index-url` for your platform (CPU vs a specific CUDA version):

```bash
pip install -e .
pip install "airunner-tts-vendor[ml]" \
  --index-url https://download.pytorch.org/whl/cu129   # GPU
pip install "airunner-tts-vendor[ml]" \
  --index-url https://download.pytorch.org/whl/cpu     # CPU
# Plus, per language:
pip install -e ".[zh]"   # Chinese (MeloTTS/OpenVoice)
pip install -e ".[jp]"   # Japanese
pip install -e ".[kr]"   # Korean
pip install -e ".[tw]"   # Taiwanese Hokkien (g2pkk)
pip install -e ".[gruut]"  # German/Spanish/French phonemization support
```

No dependency on `airunner`, `airunner-common`, or `airunner-services`
-- this package installs and imports standalone. `airunner-services`
depends on the published version of this package; see
`runtimes/openvoice_model_manager.py` and
`runtimes/openvoice_runtime_helpers.py` in that repository for its
public surface (`melo.api`, `melo.runtime_support`, `openvoice.api`,
`openvoice.se_extractor`, `openvoice.mel_processing`) and the resolver
registration that reconnects it to the application after installing
this package.

## Testing

This fork has no tests of its own in the source repository; the TTS
synthesis tests that exercise it (`test_tts_synthesize_functional.py`,
`test_model_load_security.py`) stay in `airunner-services`, since they
need the full daemon and a real GPU/model to run meaningfully. CI here
is therefore limited to import-level sanity checks: that both
subtrees import cleanly with no application dependency present, and
that the language-enum/resolver integration points this repository
exposes behave as documented. Full synthesis coverage (and the
[bobross.wav](https://github.com/Capsize-Games/airunner/blob/master/services/src/airunner_services/assets/reference_speakers/bobross.wav)
reference-speaker fixture it uses) stays in `airunner-services` as an
integration test against this published package.
