KoljaB / Linguflex

Command Your World with Voice
387 stars 41 forks source link

requirements installation error #10

Open waveoffire opened 3 months ago

waveoffire commented 3 months ago

when i install requirements there is error: The conflict is caused by: The user requested openai==1.13.3 realtimetts 0.4.1 depends on openai==1.30.5

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

command used: pip install -r requirements.txt Python 3.10.9

hatlessman commented 3 months ago

I dropped realtimetts down to 0.3.48 and removed pypiwin32 (I'm on Archlinux). That fixed some errors but then I got

ERROR: Cannot install -r requirements.txt (line 100), -r requirements.txt (line 113), -r requirements.txt (line 115), -r requirements.txt (line 116), -r requirements.txt (line 118), -r requirements.txt (line 122), -r requirements.txt (line 125), -r requirements.txt (line 20), -r requirements.txt (line 35), -r requirements.txt (line 38), -r requirements.txt (line 51), -r requirements.txt (line 53), -r requirements.txt (line 69), -r requirements.txt (line 7), -r requirements.txt (line 72), -r requirements.txt (line 84), -r requirements.txt (line 85), -r requirements.txt (line 91), -r requirements.txt (line 92), -r requirements.txt (line 94), -r requirements.txt (line 97), -r requirements.txt (line 99), RealtimeSTT, RealtimeTTS and numpy==1.23.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.23.5
    altair 5.2.0 depends on numpy
    blis 0.7.11 depends on numpy>=1.19.0; python_version >= "3.9"
    contourpy 1.2.0 depends on numpy<2.0 and >=1.20
    ctranslate2 4.0.0 depends on numpy
    encodec 0.1.1 depends on numpy
    fairseq 0.12.2 depends on numpy; python_version >= "3.7"
    gradio 3.34.0 depends on numpy
    gruut 2.2.3 depends on numpy<2.0.0 and >=1.19.0
    librosa 0.9.1 depends on numpy>=1.17.0
    llama-cpp-python 0.2.56 depends on numpy>=1.20.0
    noisereduce 3.0.0 depends on numpy
    numba 0.59.0 depends on numpy<1.27 and >=1.22
    onnxruntime-gpu 1.17.1 depends on numpy>=1.21.6
    opencv-python 4.9.0.80 depends on numpy>=1.17.0; python_version >= "3.7"
    opencv-python 4.9.0.80 depends on numpy>=1.21.2; python_version >= "3.10"
    opencv-python 4.9.0.80 depends on numpy>=1.19.3; python_version >= "3.9"
    opencv-python 4.9.0.80 depends on numpy>=1.17.3; python_version >= "3.8"
    pandas 1.5.3 depends on numpy>=1.21.0; python_version >= "3.10"
    praat-parselmouth 0.4.3 depends on numpy>=1.7.0
    pyworld 0.3.2 depends on numpy
    resampy 0.4.3 depends on numpy>=1.17
    sacrebleu 2.4.0 depends on numpy>=1.17
    tensorboardx 2.6.2.2 depends on numpy
    torchfcpe 0.0.4 depends on numpy
    transformers 4.38.2 depends on numpy>=1.17
    pvporcupine 1.9.5 depends on numpy
    scipy 1.12.0 depends on numpy<1.29.0 and >=1.22.4
    tts 0.22.0 depends on numpy==1.22.0; python_version <= "3.10"

Looks like tts 0.22.0 wants numpy==1.22.0 and python_version <= "3.10", but requirements is setting numpy==1.23.5. Docs say to use python 3.10.9.

hatlessman commented 3 months ago

I removed some of the explicit versions in requirements.txt and installed torch/torchaudio 2.3.0 instead of 2.1.2. I'm still working on all the settings to get it to launch, but I think I've solved the requirements problems. Here's my requirements.txt:

RealtimeSTT==0.1.16
RealtimeTTS
PyQt6-Fluent-Widgets==1.5.7
absl-py==2.1.0
aiofiles==23.2.1
aiohttp==3.9.3
altair==5.2.0
annotated-types==0.6.0
antlr4-python3-runtime==4.8
anyascii==0.3.2
anyio==4.3.0
asttokens==2.4.1
audioread==3.0.1
av==11.0.0
Babel==2.14.0
bangla==0.0.2
beautifulsoup4==4.12.3
bitarray==2.9.2
blinker==1.7.0
blis==0.7.11
bnnumerizer==0.0.2
bnunicodenormalizer==0.1.6
Brotli==1.1.0
cachetools==5.3.3
catalogue==2.0.10
certifi==2024.2.2
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
cloudpathlib==0.16.0
coloredlogs==15.0.1
comtypes==1.3.1
confection==0.1.4
contourpy==1.2.0
coqpit==0.0.17
cryptography==42.0.5
ctranslate2==4.0.0
cycler==0.12.1
cymem==2.0.8
Cython==3.0.9
darkdetect==0.8.0
dateparser==1.1.8
decorator==5.1.1
diskcache==5.6.3
distro==1.9.0
docopt==0.6.2
docstring-parser==0.15
einops==0.7.0
emoji==2.8.0
encodec==0.1.1
enum34==1.1.10
fairseq==0.12.2
faiss-cpu==1.7.3
fastapi==0.110.2
ffmpeg-python==0.2.0
face_recognition
ffmpy==0.3.1
Flask==3.0.2
Flask-Cors==4.0.0
fonttools==4.49.0
fsspec==2024.2.0
g2pkk==0.1.2
gin-config==0.5.0
google-api-core==2.17.1
google-api-python-client==2.121.0
google-auth==2.28.2
google-auth-oauthlib==1.2.0
gradio==3.34.0
gradio_client==0.2.9
grpcio==1.62.1
gruut==2.2.3
gruut-lang-de==2.0.0
gruut-lang-es==2.0.0
gruut-lang-fr==2.0.2
hangul-romanize==0.1.0
html2text==2024.2.26
inflect==7.0.0
instructor==1.1.0
jieba==0.42.1
json5==0.9.22
langcodes==3.3.0
lazy_loader==0.3
librosa
llama_cpp_python==0.2.56
local-attention==1.9.0
Markdown==3.5.2
MouseInfo==0.1.3
murmurhash==1.0.10
mutagen==1.47.0
noisereduce==3.0.0
numba==0.59.0
numpy==1.23.5
onnxruntime-gpu==1.17.1
openai
openai-token-counter
opencv-python==4.9.0.80
ollama
pandas==1.5.3
praat-parselmouth==0.4.3
preshed==3.0.9
PyAutoGUI==0.9.54
pycryptodomex==3.20.0
pynndescent==0.5.11
pynput==1.7.6
pypinyin==0.51.0
PyQt6-tools
pysbd==0.3.4
PySimpleGUI==5.0.3
python-dotenv==1.0.1
python-vlc==3.0.20123
pytube==15.0.0
pyworld==0.3.2
referencing==0.33.0
resampy==0.4.3
sacrebleu==2.4.0
sounddevice==0.4.6
tensorboardX==2.6.2.2
threadpoolctl==3.3.0
tinytuya==1.13.2
torchcrepe==0.0.20
torchfcpe==0.0.4
tornado==6.4
traitlets==5.14.1
transformers==4.38.2
uvicorn==0.27.0
Wave==0.0.2
websockets==12.0
yt-dlp==2024.3.10
open-interpreter==0.2.4
simpleaudio
keyboard==0.13.5

Here's my pip freeze:

absl-py==2.1.0
aifs==0.0.9
aiofiles==23.2.1
aiohttp==3.9.3
aiosignal==1.3.1
altair==5.2.0
annotated-types==0.6.0
antlr4-python3-runtime==4.8
anyascii==0.3.2
anyio==4.3.0
asgiref==3.8.1
astor==0.8.1
asttokens==2.4.1
async-timeout==4.0.3
attrs==23.2.0
audioread==3.0.1
av==11.0.0
azure-cognitiveservices-speech==1.38.0
Babel==2.14.0
backoff==2.2.1
bangla==0.0.2
bcrypt==4.1.3
beautifulsoup4==4.12.3
bitarray==2.9.2
blessed==1.20.0
blinker==1.7.0
blis==0.7.11
bnnumerizer==0.0.2
bnunicodenormalizer==0.1.6
Brotli==1.1.0
build==1.2.1
cachetools==5.3.3
catalogue==2.0.10
certifi==2024.2.2
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
chroma-hnswlib==0.7.3
chromadb==0.4.24
click==8.1.7
cloudpathlib==0.16.0
colorama==0.4.6
coloredlogs==15.0.1
comm==0.2.2
comtypes==1.3.1
confection==0.1.4
contourpy==1.2.0
coqpit==0.0.17
cryptography==42.0.5
ctranslate2==4.0.0
cycler==0.12.1
cymem==2.0.8
Cython==3.0.9
darkdetect==0.8.0
dataclasses-json==0.6.7
dateparser==1.1.8
debugpy==1.8.1
decorator==5.1.1
deepdiff==7.0.1
deepspeed==0.14.4
Deprecated==1.2.14
diskcache==5.6.3
distro==1.9.0
dlib==19.24.4
docopt==0.6.2
docstring-parser==0.15
editor==1.6.6
einops==0.7.0
elevenlabs==1.3.1
emoji==2.8.0
encodec==0.1.1
enum34==1.1.10
evdev==1.7.1
exceptiongroup==1.2.1
executing==2.0.1
face-recognition==1.3.0
face-recognition-models==0.3.0
fairseq==0.12.2
faiss-cpu==1.7.3
fastapi==0.110.2
faster-whisper==1.0.2
ffmpeg-python==0.2.0
ffmpy==0.3.1
filelock==3.15.3
filetype==1.2.0
Flask==3.0.2
Flask-Cors==4.0.0
flatbuffers==24.3.25
fonttools==4.49.0
frozenlist==1.4.1
fsspec==2024.2.0
future==1.0.0
g2pkk==0.1.2
gin-config==0.5.0
git-python==1.0.3
gitdb==4.0.11
GitPython==3.1.43
google-api-core==2.17.1
google-api-python-client==2.121.0
google-auth==2.28.2
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.1
gradio==3.34.0
gradio_client==0.2.9
grpcio==1.62.1
gruut==2.2.3
gruut-ipa==0.13.0
gruut-lang-de==2.0.0
gruut-lang-en==2.0.0
gruut-lang-es==2.0.0
gruut-lang-fr==2.0.2
h11==0.14.0
halo==0.0.31
hangul-romanize==0.1.0
hjson==3.1.0
html2image==2.0.4.3
html2text==2024.2.26
httpcore==1.0.5
httplib2==0.22.0
httptools==0.6.1
httpx==0.27.0
huggingface-hub==0.23.4
humanfriendly==10.0
hydra-core==1.0.7
idna==3.7
importlib_metadata==7.1.0
importlib_resources==6.4.0
inflect==7.0.0
inquirer==3.2.5
instructor==1.1.0
ipykernel==6.29.4
ipython==8.25.0
itsdangerous==2.2.0
jamo==0.4.1
jedi==0.19.1
jieba==0.42.1
Jinja2==3.1.4
joblib==1.4.2
json5==0.9.22
jsonlines==1.2.0
jsonpath-python==1.0.6
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter_client==8.6.2
jupyter_core==5.7.2
keyboard==0.13.5
kiwisolver==1.4.5
kubernetes==30.1.0
langcodes==3.3.0
langdetect==1.0.9
lazy_loader==0.3
librosa==0.9.1
linkify-it-py==2.0.3
litellm==1.40.8
llama_cpp_python==0.2.56
llvmlite==0.42.0
local-attention==1.9.0
log-symbols==0.0.14
lxml==5.2.2
Markdown==3.5.2
markdown-it-py==2.2.0
MarkupSafe==2.1.5
marshmallow==3.21.3
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdit-py-plugins==0.3.3
mdurl==0.1.2
mmh3==4.1.0
monotonic==1.6
MouseInfo==0.1.3
mpmath==1.3.0
multidict==6.0.5
murmurhash==1.0.10
mutagen==1.47.0
mypy-extensions==1.0.0
nest-asyncio==1.6.0
networkx==2.8.8
ninja==1.11.1.1
nltk==3.8.1
noisereduce==3.0.0
num2words==0.5.13
numba==0.59.0
numpy==1.23.5
nvidia-cublas-cu11==11.11.3.6
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu11==11.8.87
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu11==11.8.89
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu11==11.8.89
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu11==8.7.0.84
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu11==10.9.0.58
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu11==10.3.0.86
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu11==11.4.1.48
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu11==11.7.5.86
nvidia-cusparse-cu12==12.1.0.106
nvidia-ml-py==12.555.43
nvidia-nccl-cu11==2.20.5
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.5.40
nvidia-nvtx-cu11==11.8.86
nvidia-nvtx-cu12==12.1.105
oauthlib==3.2.2
ollama==0.2.1
omegaconf==2.0.6
onnxruntime==1.18.0
onnxruntime-gpu==1.17.1
open-interpreter==0.2.4
openai==1.35.3
openai-token-counter==1.0.2
opencv-python==4.9.0.80
opentelemetry-api==1.25.0
opentelemetry-exporter-otlp-proto-common==1.25.0
opentelemetry-exporter-otlp-proto-grpc==1.25.0
opentelemetry-instrumentation==0.46b0
opentelemetry-instrumentation-asgi==0.46b0
opentelemetry-instrumentation-fastapi==0.46b0
opentelemetry-proto==1.25.0
opentelemetry-sdk==1.25.0
opentelemetry-semantic-conventions==0.46b0
opentelemetry-util-http==0.46b0
ordered-set==4.1.0
orjson==3.10.5
overrides==7.7.0
packaging==24.1
pandas==1.5.3
parso==0.8.4
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.2
pooch==1.8.2
portalocker==2.8.2
posthog==3.5.0
praat-parselmouth==0.4.3
preshed==3.0.9
prompt_toolkit==3.0.47
protobuf==4.25.3
psutil==5.9.8
ptyprocess==0.7.0
pulsar-client==3.5.0
pure-eval==0.2.2
pvporcupine==1.9.5
py-cpuinfo==9.0.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
PyAudio==0.2.14
PyAutoGUI==0.9.54
pycparser==2.22
pycryptodomex==3.20.0
pydantic==2.7.0
pydantic_core==2.18.1
pydub==0.25.1
PyGetWindow==0.0.9
Pygments==2.18.0
PyMsgBox==1.0.9
pynndescent==0.5.11
pynput==1.7.6
pyparsing==3.1.2
pypdf==4.2.0
pyperclip==1.9.0
PyPika==0.48.9
pypinyin==0.51.0
pyproject_hooks==1.1.0
PyQt6==6.4.2
PyQt6-Fluent-Widgets==1.5.7
PyQt6-Frameless-Window==0.3.9
pyqt6-plugins==6.4.2.2.3
PyQt6-Qt6==6.4.3
PyQt6-sip==13.6.0
pyqt6-tools==6.4.2.3.3
PyRect==0.2.0
pysbd==0.3.4
PyScreeze==0.1.30
PySimpleGUI==5.0.3
python-crfsuite==0.9.10
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-iso639==2024.4.27
python-magic==0.4.27
python-multipart==0.0.9
python-vlc==3.0.20123
python-xlib==0.33
python3-xlib==0.15
pyttsx3==2.90
pytube==15.0.0
pytweening==1.2.0
pytz==2024.1
pyworld==0.3.2
PyYAML==6.0.1
pyzmq==26.0.3
qt6-applications==6.4.3.2.3
qt6-tools==6.4.3.1.3
rapidfuzz==3.9.3
readchar==4.1.0
RealTimeSTT==0.1.16
RealTimeTTS==0.1.3
referencing==0.33.0
regex==2024.5.15
requests==2.32.3
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
resampy==0.4.3
rich==13.7.1
rpds-py==0.18.1
rsa==4.9
runs==1.2.2
sacrebleu==2.4.0
safetensors==0.4.3
scikit-learn==1.5.0
scipy==1.12.0
semantic-version==2.10.0
Send2Trash==1.8.3
shellingham==1.5.4
simpleaudio==1.0.4
six==1.16.0
smmap==5.0.1
sniffio==1.3.1
sounddevice==0.4.6
soundfile==0.12.1
soupsieve==2.5
spinners==0.0.24
srsly==2.4.8
stack-data==0.6.3
stanza==1.6.1
starlette==0.37.2
stream2sentence==0.2.3
sympy==1.12.1
tabulate==0.9.0
tenacity==8.4.1
tensorboardX==2.6.2.2
termcolor==2.4.0
threadpoolctl==3.3.0
tiktoken==0.5.2
tinytuya==1.13.2
tokenizers==0.15.2
tokentrim==0.1.13
toml==0.10.2
tomli==2.0.1
toolz==0.12.1
torch==2.3.0+cu118
torchaudio==2.3.0+cu118
torchcrepe==0.0.20
torchfcpe==0.0.4
tornado==6.4
tqdm==4.66.4
traitlets==5.14.1
transformers==4.38.2
triton==2.3.0
typer==0.12.3
typing-inspect==0.9.0
typing_extensions==4.12.2
tzlocal==5.2
uc-micro-py==1.0.3
unstructured==0.12.5
unstructured-client==0.23.7
uritemplate==4.1.1
urllib3==2.2.2
uvicorn==0.27.0
uvloop==0.19.0
watchfiles==0.22.0
Wave==0.0.2
wcwidth==0.2.13
webrtcvad==2.0.10
websocket-client==1.8.0
websockets==12.0
Werkzeug==3.0.3
wget==3.2
wrapt==1.16.0
xmod==1.8.1
yarl==1.9.4
yt-dlp==2024.3.10
zipp==3.19.2
KoljaB commented 3 months ago

Thank you very much for providing these changes. I will look into that and compare them with what we have until now. I can imagine what you had been through until ending up with this. There's no easy solution...


I am working an this add-on to the Readme, so people know that to expect and as an explanation why it is like it is:



Understanding Installation Challenges

Sometimes people suggest, "Just provide a Docker container; installation is so hard." I understand the frustration, but here's why that is challenging:

  1. Complex Integration: Linguflex is a substantial framework combining advanced TTS technologies like realtime local neural TTS voice generation with realtime RVC fine-tuning, alongside a plethora of other features. Ensuring that all these elements work together in a single environment is like finding the lowest common denominator for your favorite 60 Python libraries instead of just three. Moreover, this system must operate consistently across various platforms, OS versions, Python environments, CUDA versions, and CuDNN versions. It's a complex puzzle.
  2. Dependency Management: The nature of Python creates an inherently unstable environment. After determining a stable mix of libraries, we painstakingly specify and fix versions in our requirements.txt. However, fixed versions in our documentation don't guarantee that external libraries won't update their subdependencies, potentially causing disruptions. Even with fixed versions, background updates can still introduce breaking changes. We sometimes have to reinstall libraries to resolve these issues, but boy - keeping track of it all isn't always fun!

Patience Is Key: Please have patience with the installation process. Things might not work on the first try. Sometimes, I just need a hint to things so I can fix them, and sometimes you might be able to solve issues by yourself. While it’s rare, there are instances where there might be nothing we can do. Trying to reduce those rare cases step by step.

Note: I constantly try to explore more user-friendly installation methods (and yes including docker).

hatlessman commented 3 months ago

More fun. Linguflex (or one of its dependencies) uses tkinter. I had to follow https://dev.to/xshapira/using-tkinter-with-pyenv-a-simple-two-step-guide-hh5 to get tkinter working inside a venv. I had to also install RealtimeTTS==0.4.1 (pip still threw errors, but it still worked?). It also needed espeak. Now I have whisper problems. :/

Traceback (most recent call last):
  File "<myhome>/.pyenv/versions/3.10.14/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "<myhome>/.pyenv/versions/3.10.14/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "<myhome>/Linguflex/.linguflex/lib/python3.10/site-packages/RealtimeSTT/audio_recorder.py", line 617, in _transcription_worker
    model = faster_whisper.WhisperModel(
  File "<myhome>/Linguflex/.linguflex/lib/python3.10/site-packages/faster_whisper/transcribe.py", line 144, in __init__
    self.model = ctranslate2.models.Whisper(
RuntimeError: CUDA failed with error initialization error
KoljaB commented 3 months ago

Ok please try to do:

pip install transformers==4.38.2
KoljaB commented 3 months ago

That sounds like ctranslate2 thing and setting transformers back could solve that

hatlessman commented 3 months ago

Blargh! I'm running a 1080TI, a pascal card, doesn't support float16 :(

[2024-06-21 11:09:44.523] [ctranslate2] [thread 3455359] [warning] The compute type inferred from the saved model is float16, but the target device or backend do not support efficient float16 computation. The model weights have been automatically converted to use the float32 compute type instead.
hatlessman commented 3 months ago

Blargh! Spoke too soon. Thats just a warning. I just tried transformers==4.38.2. Got the same issue.

KoljaB commented 3 months ago

I hate CUDA. I think there was some reason I did not use latest torch/torchaudio 2.3.0 but not sure if it was related to that. You might want to try 2.1.2 again. It's between faster_whisper and CUDA/torch, so maybe reinstall the current faster_whisper library could be worth it. Some dependent libs might have been replaced with other versions in the installation process.