pip install doesn't work
pip package
clone and download
try use uv and python 3.11
using UV with python 3.11.6 on windows gives me back:
Resolved 125 packages in 1.05s × Failed to build pkuseg==0.0.25├─▶ The build backend returned an error ╰─▶ Call tosetuptools.build_meta:legacy.build_wheel` failed (exit code: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Users\Ron.Metzger\AppData\Local\uv\cache\builds-v0\.tmp25Bwi7\Lib\site-packages\setuptools\build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Ron.Metzger\AppData\Local\uv\cache\builds-v0\.tmp25Bwi7\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "C:\Users\Ron.Metzger\AppData\Local\uv\cache\builds-v0\.tmp25Bwi7\Lib\site-packages\setuptools\build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\Ron.Metzger\AppData\Local\uv\cache\builds-v0\.tmp25Bwi7\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'numpy'
hint: This usually indicates a problem with the package or the build environment.
help: If you want to add the package regardless of the failed resolution, provide the --frozen flag to skip locking and syncing.
`
Same result when I import and install numpy through UV before trying add chatterbox-tts
For me this helped:
python3.11 -m venv .venv311
source .venv311/bin/activate
python -m pip install -U pip "setuptools>=75" wheel
pip install -e .
along with pyproject.toml (I removed a Chinese language dependency also):
[project]
name = "chatterbox-tts"
version = "0.1.4"
description = "Chatterbox: Open Source TTS and Voice Conversion by Resemble AI"
readme = "README.md"
requires-python = ">=3.10,<3.12"
license = {file = "LICENSE"}
authors = [
{name = "resemble-ai", email = "[email protected]"}
]
dependencies = [
"numpy>=1.24.0,<1.26.0",
"librosa==0.11.0",
"s3tokenizer",
"torch==2.6.0",
"torchaudio==2.6.0",
"transformers==4.46.3",
"diffusers==0.29.0",
"resemble-perth==1.0.1",
"conformer==0.3.2",
"safetensors==0.5.3",
"pykakasi==2.3.0",
"gradio==5.44.1",
]
[project.urls]
Homepage = "https://github.com/resemble-ai/chatterbox"
Repository = "https://github.com/resemble-ai/chatterbox"
[build-system]
requires = ["setuptools>=75", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
I spent more time on trying to get the deps installed than I'd like to admit with this issue, too. The sequence that ended up working for me was:
python3.11 -m venv .venv311
source .venv311/bin/activate
python -m pip install -U pip "setuptools>=75" wheel
uv pip install numpy --no-build-isolation #installed numpy==2.3.3
pip install -e .
Edit: Well, I spoke too soon. That did get the deps installed and will may work for some, but now I need to get Pytorch upgraded to support RTX 5090 with cuda 12.9. I'm giving up on this machine for now.
It does, however, work with a 3080 on cuda 12.4. I noticed pip install -e . removed the previous numpy and installed another, but I was still able to run after. Hope this helps.
This works for me:
CUDA: 12.1
virtual environment
Python 3.11.13
pip install --upgrade pip setuptools wheel cython
pip install numpy
pip install pkuseg==0.0.25
pip install chatterbox-tts
Could you try my version, I switched to a different pkuseg and it appears to work good (test multilingual model with Chinese text)
https://github.com/rsxdalv/chatterbox/tree/faster
Would it help to set up some CI process for this?
Could you try my version, I switched to a different pkuseg and it appears to work good (test multilingual model with Chinese text)
https://github.com/rsxdalv/chatterbox/tree/faster
success
This works for me:
CUDA: 12.1 virtual environment Python 3.11.13 pip install --upgrade pip setuptools wheel cython pip install numpy pip install pkuseg==0.0.25 pip install chatterbox-tts
Still not working in a MacOS sillicon environment. Neither is https://github.com/rsxdalv/chatterbox/tree/faster
Got it working in docker, but this runs only on CPU and not GPU.
Hi, this is a numpy version problem, conflicts between google colab environment requirements and numpy package coming together with the chatterbox. There is no way (even worse with downgrading Python in colab to 3.11 or 3.12) to force colab to accept numpy 1.26.0 and I even can't figure if the 1.26.0 version that chatterbox require is enough for the colab environment to work. On hugginface people are complaining the same about this numpy conflict when trying to install on colab:
Collecting numpy==1.26.0 Downloading numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (58 kB) Downloading numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.9/17.9 MB 139.8 MB/s 0:00:00 Installing collected packages: numpy ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. opencv-python-headless 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 1.26.0 which is incompatible. opencv-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 1.26.0 which is incompatible. opencv-contrib-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 1.26.0 which is incompatible. thinc 8.3.6 requires numpy<3.0.0,>=2.0.0, but you have numpy 1.26.0 which is incompatible. Successfully installed numpy-1.26.0 WARNING: The following packages were previously imported in this runtime: [numpy] You must restart the runtime in order to use newly installed versions.
Even when running a no-cache pip
!pip --no-cache-dir install chatterbox-tts
It still goes for the 1.25 numpy download
Collecting numpy<1.26.0,>=1.24.0 (from chatterbox-tts) Downloading numpy-1.25.2.tar.gz (10.8 MB)
Can anybody take a look on this?
Thanks
Same installation complaints on the Hugginface page of Chatterbox..https://huggingface.co/ResembleAI/chatterbox/discussions/40
I followed this installation video using another fork and I dun see that error anymore
https://youtu.be/IQLmZH9Wpso?si=yvkIGZjnCyb_FP7H