myshell-ai/AIlice

Recommended Python Version?

Closed this issue · 9 comments

First off, thank you for creating this! I've been playing with other agent systems, and found AIlice to be quite interesting.

Is there a recommended python version I should be running AIlice in?

Currently running AIlice on a NUC running ubuntu 23.10 (CPU only, 32GB RAM) on python 3.11.7. Previously rubbing on the same machine but with python 3.10.6

Thank you! Due to time constraints, I haven't tested several similar competitors, so positive feedback from users like you with experience using other agents is very valuable to me.
Regarding the Python versions, I developed and tested with 3.9.18 and 3.10.13, and they performed well. If you encounter any issues with version 3.11, feel free to provide feedback, and we can investigate whether any fixes are needed.

Ah, found an issue with python 3.11.7:

...
Collecting numba>=0.45.1 (from librosa)
  Downloading numba-0.57.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 22.7 MB/s eta 0:00:00
  Downloading numba-0.56.4.tar.gz (2.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 23.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-j7utr1ky/numba_02d67b07d5c543a2aa5582a055bf7d48/setup.py", line 51, in <module>
          _guard_py_ver()
        File "/tmp/pip-install-j7utr1ky/numba_02d67b07d5c543a2aa5582a055bf7d48/setup.py", line 48, in _guard_py_ver
          raise RuntimeError(msg.format(cur_py, min_py, max_py))
      RuntimeError: Cannot install on Python version 3.11.7; only versions >=3.7,<3.11 are supported.
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Looks like the speech installation won't work because one of its dependencies (numba) requires a python version less than 3.11

I also tried it with 3.11.7, and got the same error, and couldn't find a solution. But I believe you have missed nothing, because voice conversation is still an experimental function at present, and it has some problems in detecting voice activity, so the experience is very poor.
I think a better solution is to completely rewrite this module and remove some of the current complex dependencies, but this needs to be left until I complete the multi-modal model support.

I understand. Multimodal support is gonna be epic! As for speech, I was just testing it out, as previously on 3.10.6 I was able to install it, but never got it to produce any sound (probably due to my NUC not using my RDP connection as a audio source)

It also seems like AIlice_web is relying on speech to be installed for it to work; I think I fixed that by removing speech related code from a few files.

(Woops, previously used my other account to reply. Ah well, AI vs non ai account, what's the difference 😂)

I investigated the current status of the speech module, and it appears to be quite unfriendly for first-time users. Dependencies may be incomplete, and it takes a long time to download model weights after startup. This makes it difficult to distinguish whether AIlice is stuck or simply downloading weights. So, the issue may not be with your environment.

I was surprised by the unexpected dependence of ailice_web on speech; it's a strange occurrence. However, AIlice has evolved from a prototype project, and both speech and ailice_web still retain in their early status, resulting in various issues that need addressing. If you have any records, could you let me know which parts were modified to fix aliceweb?

Finally, the best thing about our era is that whether you're carbon-based or silicon-based life, text communication is indistinguishable:-P

Makes sense. I've mainly used the AIlice_main due to running the service on ssh, the web portion was just a added bonus.

For the changes, I forgot. I had just pulled the latest commit, and decided to delete my changes 😅

Looking back at it, I do recall removing line#49 of AIliceWeb.py, but that caused a issue with ALogger, so I modified init code to not load speech, IIRC in ARemoteAccessors, ALogger, AServices, AIliceWeb, AIliceMain, and the config file.

Never mind, after multi-modality is completed, I will consider refactor ailice_web and it will be no problem. As for voice interaction, it is actually one of the features I desire the most. It is a crucial step to make AIlice a Jarvis. I will fix and enhance it.

I just uploaded a requirements.txt to the master branch to help users solve dependency conflicts encountered during installation.
For python 3.11.7, you can install AIlice like this:

pip install -r requirements.txt
pip install typeguard==2.13.3
pip install -e .

This installation is a fully functional version, including voice dialogue and fine-tuning.

In addition, I have recently made some improvements to the voice dialogue and web interface, and at least for me, the usability is already pretty good.

Getting issues with speechOn, will make new issue, but it's working fine on 3.11.7. Thanks!