Describe the bug
The PyPI package cosyvoice (current latest 0.0.8) cannot be used for inference. It ships only a thin wrapper layer, while the actual CosyVoice model class lives in a submodule
(cosyvoice.cli.cosyvoice) that is not included in the wheel. Any attempt to use the published API fails at import time.
To Reproduce
pip install cosyvoice==0.0.8
python3 -c "from cosyvoice.api import CosyVoiceTTS"
Error
ModuleNotFoundError: No module named 'cosyvoice.utils'
(raised at cosyvoice/api.py line 3: from cosyvoice.utils.file_utils import load_wav)
Environment
- OS: macOS 15 (Apple Silicon) / Linux
- Python: 3.12
- pip: latest
Root cause — what's actually in the wheel
Listing the .py files shipped in cosyvoice-0.0.8-py3-none-any.whl:
cosyvoice/init.py
cosyvoice/api.py
cosyvoice/server.py
cosyvoice/version.py
matcha/init.py
matcha/app.py
matcha/cli.py
matcha/train.py
Files that should be there (referenced by api.py and required to instantiate CosyVoiceTTS):
- cosyvoice/cli/init.py
- cosyvoice/cli/cosyvoice.py ← the actual CosyVoice model class
- cosyvoice/cli/frontend.py
- cosyvoice/cli/model.py
- cosyvoice/utils/init.py + several utils/*.py
- cosyvoice/flow/, cosyvoice/llm/, cosyvoice/transformer/, cosyvoice/hifigan/, cosyvoice/tokenizer/, cosyvoice/dataset/ (all referenced by the YAML model config)
- the proper matcha/models/ subtree (the wheel ships only the top-level training CLI stubs)
Related issue
pip install "git+https://github.com/FunAudioLLM/CosyVoice" no longer works either — the repo's recent commits removed setup.py / pyproject.toml, so pip refuses to build it. So
users who discover the wheel is broken have no fallback path.
Suggested fix (any of these would unblock users)
- Republish the wheel with the missing submodules included. The full source is on the main branch — just need package_data / MANIFEST.in to cover all subdirs under cosyvoice/.
- Add a pyproject.toml and re-enable pip install git+https://... so users can fall back to source installs.
- If the package is no longer maintained, mark it as deprecated on PyPI and redirect users to CosyVoice2 / CosyVoice3 with working wheels.
Describe the bug
The PyPI package cosyvoice (current latest 0.0.8) cannot be used for inference. It ships only a thin wrapper layer, while the actual CosyVoice model class lives in a submodule
(cosyvoice.cli.cosyvoice) that is not included in the wheel. Any attempt to use the published API fails at import time.
To Reproduce
pip install cosyvoice==0.0.8
python3 -c "from cosyvoice.api import CosyVoiceTTS"
Error
ModuleNotFoundError: No module named 'cosyvoice.utils'
(raised at cosyvoice/api.py line 3: from cosyvoice.utils.file_utils import load_wav)
Environment
Root cause — what's actually in the wheel
Listing the .py files shipped in cosyvoice-0.0.8-py3-none-any.whl:
cosyvoice/init.py
cosyvoice/api.py
cosyvoice/server.py
cosyvoice/version.py
matcha/init.py
matcha/app.py
matcha/cli.py
matcha/train.py
Files that should be there (referenced by api.py and required to instantiate CosyVoiceTTS):
Related issue
pip install "git+https://github.com/FunAudioLLM/CosyVoice" no longer works either — the repo's recent commits removed setup.py / pyproject.toml, so pip refuses to build it. So
users who discover the wheel is broken have no fallback path.
Suggested fix (any of these would unblock users)