GlaDOS icon indicating copy to clipboard operation
GlaDOS copied to clipboard

Windows error when running python glados.py

Open vonhex opened this issue 9 months ago • 19 comments

Traceback (most recent call last): File "G:\GlaDOS\glados.py", line 18, in from glados import asr, llama, tts, vad File "G:\GlaDOS\glados\asr.py", line 5, in from . import whisper_cpp_wrapper File "G:\GlaDOS\glados\whisper_cpp_wrapper.py", line 861, in _libs["whisper"] = load_library("whisper") ^^^^^^^^^^^^^^^^^^^^^^^ File "G:\GlaDOS\glados\whisper_cpp_wrapper.py", line 547, in call raise ImportError("Could not load %s." % libname) ImportError: Could not load whisper.

vonhex avatar May 02 '24 19:05 vonhex

whisper is confirmed working

vonhex avatar May 02 '24 19:05 vonhex

Probably needs the library file moved. Getting this reliably working on Windows is my goal for the weekend.

Others have already got it working (as reported on Reddit), I'm hoping someone makes a solid pull request!

dnhkng avatar May 02 '24 19:05 dnhkng

thanks a ton for the quick reply ill stay tuned!

vonhex avatar May 02 '24 20:05 vonhex

I added "import whisper" into glados.py and it moved beyond the ImportError: Could not load whisper. This is with Python 3.9.19 Now im stuck at: (glados) PS E:\test\glados> python .\glados.py Error in sys.excepthook:

Original exception was:

l33tkr3w avatar May 04 '24 02:05 l33tkr3w

I am getting the same error on raspberry pi 4 with ubuntu image when running python glados.py. I have install whisper with version 1.1.10

Is there anything I am missing on my end?

vp2305 avatar May 09 '24 19:05 vp2305

Whisper here is not an import. It is not a python package to be installed.

It should be the compiled libwhisper.so file. On window, that currently means compiling whisper.cpp, and moving the DLL file to the glados folder.

An update is incoming, hopefully over the weekend

dnhkng avatar May 10 '24 06:05 dnhkng

Could you all try the installer instructions and script on the new 'windows' branch?

dnhkng avatar May 10 '24 18:05 dnhkng

testing now.

vonhex avatar May 10 '24 18:05 vonhex

Same error

(venv) G:\GlaDOS-windows\GlaDOS-windows>python glados.py Traceback (most recent call last): File "G:\GlaDOS-windows\GlaDOS-windows\glados.py", line 21, in from glados import asr, tts, vad File "G:\GlaDOS-windows\GlaDOS-windows\glados\asr.py", line 5, in from . import whisper_cpp_wrapper File "G:\GlaDOS-windows\GlaDOS-windows\glados\whisper_cpp_wrapper.py", line 861, in _libs["whisper"] = load_library("whisper") ^^^^^^^^^^^^^^^^^^^^^^^ File "G:\GlaDOS-windows\GlaDOS-windows\glados\whisper_cpp_wrapper.py", line 547, in call raise ImportError("Could not load %s." % libname) ImportError: Could not load whisper.

vonhex avatar May 10 '24 18:05 vonhex

Looking at your BAT file, I can say it didnt download anything

vonhex avatar May 10 '24 18:05 vonhex

G:\GlaDOS-windows\GlaDOS-windows>install_windows.bat

G:\GlaDOS-windows\GlaDOS-windows>REM Download and install the required dependencies for the project on Windows

G:\GlaDOS-windows\GlaDOS-windows>python -m venv venv

G:\GlaDOS-windows\GlaDOS-windows>.\venv\Scripts\activate

(venv) G:\GlaDOS-windows\GlaDOS-windows>

vonhex avatar May 10 '24 18:05 vonhex

WTF 😒

So, the submodules/llama.cpp and submodules/whisper.cpp folders are empty?

Not sure why this is not working. It downloaded the files for me on Windows 11.

Could you try each of the lines in the batch file manually? This should download the executables and move them to the right places, fixing the whisper library error message you get.

dnhkng avatar May 10 '24 19:05 dnhkng

Correct. I'll see if I missed something later when I have time.

On Fri, May 10, 2024, 1:05 PM David @.***> wrote:

WTF 😒

So, the submodules/llama.cpp and submodules/whisper.cpp folders are empty?

Not sure why this is not working. It downloaded the files for me on Windows 11.

— Reply to this email directly, view it on GitHub https://github.com/dnhkng/GlaDOS/issues/15#issuecomment-2105129269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSAU6HPTAL6AAP3UFQLVPTZBUK6HAVCNFSM6AAAAABHEKAWK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGEZDSMRWHE . You are receiving this because you authored the thread.Message ID: @.***>

vonhex avatar May 10 '24 19:05 vonhex

Yupp no dice, W11, cmd, downloaded the zip with the project, moved to directory saved, ran install_windows.bat, enters env but no install

vonhex avatar May 10 '24 23:05 vonhex

testing the lines individually now

vonhex avatar May 11 '24 01:05 vonhex

that worked!

vonhex avatar May 11 '24 01:05 vonhex

How do I go about changing the model?

On Fri, May 10, 2024, 1:06 PM Luke Jantzen @.***> wrote:

Correct. I'll see if I missed something later when I have time.

On Fri, May 10, 2024, 1:05 PM David @.***> wrote:

WTF 😒

So, the submodules/llama.cpp and submodules/whisper.cpp folders are empty?

Not sure why this is not working. It downloaded the files for me on Windows 11.

— Reply to this email directly, view it on GitHub https://github.com/dnhkng/GlaDOS/issues/15#issuecomment-2105129269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSAU6HPTAL6AAP3UFQLVPTZBUK6HAVCNFSM6AAAAABHEKAWK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGEZDSMRWHE . You are receiving this because you authored the thread.Message ID: @.***>

vonhex avatar May 11 '24 02:05 vonhex

By default its using llama.cpp as the LLM backend. You can adjust what model is called via the the glados_config.yml. At the bottom you can change the model, As long as you have one.

l33tkr3w avatar May 11 '24 02:05 l33tkr3w

Thanks for the tip!

On Fri, May 10, 2024, 8:19 PM l33tkr3w @.***> wrote:

By default its using llama.cpp as the LLM backend. You can adjust what model is called via the the glados_config.yml. At the bottom you can change the model, As long as you have one.

— Reply to this email directly, view it on GitHub https://github.com/dnhkng/GlaDOS/issues/15#issuecomment-2105458342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSAU6CVESOFK4ZBQGPB2R3ZBV5ZNAVCNFSM6AAAAABHEKAWK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGQ2TQMZUGI . You are receiving this because you authored the thread.Message ID: @.***>

vonhex avatar May 11 '24 02:05 vonhex

OK, I found the error; it's due to the way windows handles activating the python virtual environment changes during a script.

I have added a fixed install script, and a new start_windows.bat to start GLaDOS with a double-click!

dnhkng avatar May 11 '24 07:05 dnhkng

Closing this issue now, as there is a branch with a fix, future issues should be raised on that branch!

dnhkng avatar May 11 '24 07:05 dnhkng