DrewThomasson / ebook2audiobookXTTS

Generates an audiobook with chapters and ebook metadata using Calibre and Xtts from Coqui tts, and with optional voice cloning, and supports multiple languages
MIT License
658 stars 71 forks source link

I getting error when pip installing TTS #28

Closed NeverBeLazyG closed 1 week ago

NeverBeLazyG commented 2 weeks ago

Hey,

i am getting error while trying to install TTS. I tried differnt python version, also in venv environment, i installed spacey spearately, i checken my c++ compiler is working. can you help me ? I am using windows .

  Compiling spacy/matcher/matcher.pyx because it changed.
  Compiling spacy/matcher/phrasematcher.pyx because it changed.
  Compiling spacy/matcher/dependencymatcher.pyx because it changed.
  Compiling spacy/symbols.pyx because it changed.
  Compiling spacy/vectors.pyx because it changed.
  [ 1/41] Cythonizing spacy/attrs.pyx
  [ 2/41] Cythonizing spacy/kb.pyx
  Traceback (most recent call last):
    File "C:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\youba\AppData\Local\Temp\pip-build-env-tlncvz06\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "C:\Users\youba\AppData\Local\Temp\pip-build-env-tlncvz06\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
      self.run_setup()
    File "C:\Users\youba\AppData\Local\Temp\pip-build-env-tlncvz06\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 224, in <module>
    File "<string>", line 211, in setup_package
    File "C:\Users\youba\AppData\Local\Temp\pip-build-env-tlncvz06\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "C:\Users\youba\AppData\Local\Temp\pip-build-env-tlncvz06\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: spacy/kb.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. PS D:\python>

DrewThomasson commented 2 weeks ago

Make sure your installing it into a python 3.10 env (python < 3.11 --> https://github.com/DrewThomasson/ebook2audiobookXTTS/issues/28#issuecomment-2408088988), Thats the only one I can verify that works,

Heres the TTS GitHub repo to check if your issue exists in their issues page: https://github.com/coqui-ai/TTS

Or Just use the Docker install, its a lot easier

ROBERT-MCDOWELL commented 2 weeks ago

coqui-tts is (still) not compatible with python > 3.11

for now you cannot install ebook2audiobookXTTS with pip install since I'm working and fixing some last glitches on the requirements.txt and setup.py (not yet released) so if you want to run python app.py directly you must:

Centos/Fedora/Redhat dnf install -y calibre ffmpeg

Ubuntu/Debian apt-get install -y calibre ffmpeg

conda create --prefix /path/to/env/folder python=3.11 conda activate /path/to/env/folder

pip install pydub nltk beautifulsoup4 ebooklib coqui-tts tqdm mecab mecab-python3 unidic gradio

python -m unidic download

DrewThomasson commented 2 weeks ago

https://github.com/DrewThomasson/ebook2audiobookXTTS/issues/28#issuecomment-2408088988

Thx for the extra info @ROBERT-MCDOWELL 🙌

Also if you plan on using multiple Python env's I would recommend installing something like Miniconda so you can handle multiple python env's at the same time

ROBERT-MCDOWELL commented 2 weeks ago

@DrewThomasson you're welcome. pls do not modify your repo for now as I'm refactoring your code and discovered hard incompatibility between calibre library versions and python env installed compatible with coqui-tts causing code break. (I'm talking about native run of ebook2audiobook in a python virtual env only).

DrewThomasson commented 2 weeks ago

@DrewThomasson you're welcome. pls do not modify your repo for now as I'm refactoring your code and discovered hard incompatibility between calibre library versions and python env installed compatible with coqui-tts causing code break. (I'm talking about native run of ebook2audiobook in a python virtual env only).

kk I'll put changes on hold for now lol,

ROBERT-MCDOWELL commented 2 weeks ago

if your changes concerns other than app.py so it's ok. if it's not big changes on app.py so you can do it to and will update it on my side too

DrewThomasson commented 1 week ago

@NeverBeLazyG

I think i solved your pip install issue btw

I updated the readme with the new tts pip install

use this instead

pip install coqui-tts==0.24.2 pydub nltk beautifulsoup4 ebooklib tqdm gradio==4.44.0

python -m nltk.downloader punkt
python -m nltk.downloader punkt_tab
dedh121224 commented 1 week ago
pip install coqui-tts==0.24.2 pydub nltk beautifulsoup4 ebooklib tqdm gradio==4.44.0

python -m nltk.downloader punkt
python -m nltk.downloader punkt_tab

This command can work, unlike the current README.md command

DrewThomasson commented 1 week ago

?

I thought I just updated the readme to have that instead like 9 hours ago?

Is it not showing on your end?

dedh121224 commented 1 week ago

I encountered the following error previously due to unknown circumstances:

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. pylint 2.17.1 requires dill>=0.2; python_version < "3.11", which is not installed. xformers 0.0.20 requires torch==2.0.1, but you have torch 2.5.0 which is incompatible.

However, the system is now functioning normally. The instructions in the README.md file are correct and up-to-date

DrewThomasson commented 1 week ago

Good enough lol

What are you also pasting the mecab install commands in for non-Latin languages?

Idk why I'm not getting that error when I paste

pip install coqui-tts==0.24.2 pydub nltk beautifulsoup4 ebooklib tqdm gradio==4.44.0

python -m nltk.downloader punkt
python -m nltk.downloader punkt_tab

into my windows 10 powershell in a python 3.10 env

DrewThomasson commented 1 week ago

@dedh121224

Also thanks for the update, good to hear that its finally working locally for windows users 👍

NeverBeLazyG commented 1 week ago

@NeverBeLazyG

I think i solved your pip install issue btw

I updated the readme with the new tts pip install

  • That is the new pip install that's still being updated :)
  • Tested on my windows computer and now I no longer get the error you were getting with spacy :)

use this instead

pip install coqui-tts==0.24.2 pydub nltk beautifulsoup4 ebooklib tqdm gradio==4.44.0

python -m nltk.downloader punkt
python -m nltk.downloader punkt_tab

Thanks man 👍