dnhkng / GlaDOS

This is the Personality Core for GLaDOS, the first steps towards a real-life implementation of the AI from the Portal series by Valve.
MIT License
2.9k stars 274 forks source link

start_windows fails to launch #84

Open GameMelvin opened 6 hours ago

GameMelvin commented 6 hours ago

Hi, the install goes as it should but as soon as I use the start file it opens CMD for a second before closing again and not starting anything.

thijsi123 commented 6 hours ago

Try adding PAUSE at the end of start_windows.bat and run again.

so like this:


@echo off
REM Start GLaDOS

call .\venv\Scripts\activate
python glados.py
PAUSE
GameMelvin commented 6 hours ago

Traceback (most recent call last): File "C:\Users\gamem\Desktop\GlaDOS-main\glados.py", line 21, in from glados import asr, tts, vad File "C:\Users\gamem\Desktop\GlaDOS-main\glados\asr.py", line 6, in from . import whisper_cpp_wrapper File "C:\Users\gamem\Desktop\GlaDOS-main\glados\whisper_cpp_wrapper.py", line 861, in _libs["whisper"] = load_library("whisper") ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamem\Desktop\GlaDOS-main\glados\whisper_cpp_wrapper.py", line 547, in call raise ImportError("Could not load %s." % libname) ImportError: Could not load whisper.

This is the error I get

thijsi123 commented 6 hours ago

Did you install using install_windows.bat? (I'm no expert in this, but I'll try to help.)

GameMelvin commented 6 hours ago

Yes, I used the install_windows.bat.

thijsi123 commented 6 hours ago

Can you confirm that submodules\whisper.cpp and llama.cpp folders exist? In the Glados folder?

GameMelvin commented 6 hours ago

Yes. both exist in the folder Screenshot 2024-09-19 180352

thijsi123 commented 6 hours ago

Could you remove them and rerun the installer?

thijsi123 commented 6 hours ago

I mean this:

echo Downloading Llama...
curl -L "https://github.com/ggerganov/llama.cpp/releases/download/b3266/cudart-llama-bin-win-cu12.2.0-x64.zip" --output "cudart-llama-bin-win-cu12.2.0-x64.zip"
curl -L "https://github.com/ggerganov/llama.cpp/releases/download/b3266/llama-b3266-bin-win-cuda-cu12.2.0-x64.zip" --output "llama-bin-win-cuda-cu12.2.0-x64.zip"
echo Unzipping Llama...
tar -xf cudart-llama-bin-win-cu12.2.0-x64.zip -C submodules\llama.cpp
tar -xf llama-bin-win-cuda-cu12.2.0-x64.zip -C submodules\llama.cpp

echo Downloading Whisper...
curl -L "https://github.com/ggerganov/whisper.cpp/releases/download/v1.6.0/whisper-cublas-12.2.0-bin-x64.zip" --output "whisper-cublas-12.2.0-bin-x64.zip"
echo Unzipping Whisper...
tar -xf whisper-cublas-12.2.0-bin-x64.zip -C submodules\whisper.cpp
echo Cleaning up...
del whisper-cublas-12.2.0-bin-x64.zip
del cudart-llama-bin-win-cu12.2.0-x64.zip
del llama-bin-win-cuda-cu12.2.0-x64.zip
GameMelvin commented 5 hours ago

Still gives the same error.

thijsi123 commented 5 hours ago

IS python 3.12 installed and does it show up like this in cmd?

C:\Users\xxx>python -V
Python 3.12.6   (should be 3.12.x)

and if it doesn't show like this try this command:

C:\Users\xxx>python3.12
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep  6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

if it works it should be alright. No need to worry about "C:\Users\xxx>python -V"

attempt 2:

run this as a bat file

@echo off

:: Downloading Whisper
echo Downloading Whisper...
curl -L "https://github.com/ggerganov/whisper.cpp/releases/download/v1.6.0/whisper-cublas-12.2.0-bin-x64.zip" --output "whisper-cublas-12.2.0-bin-x64.zip"

:: Creating submodules directory for Whisper
echo Creating submodules directory for Whisper...
mkdir submodules\whisper.cpp

:: Unzipping Whisper using PowerShell with overwrite
echo Unzipping Whisper using PowerShell...
powershell -Command "Expand-Archive -Path 'whisper-cublas-12.2.0-bin-x64.zip' -DestinationPath 'submodules\whisper.cpp' -Force"

:: Cleaning up Whisper zip file
echo Cleaning up...
del whisper-cublas-12.2.0-bin-x64.zip

:: Downloading Llama
echo Downloading Llama...
curl -L "https://github.com/ggerganov/llama.cpp/releases/download/b3266/cudart-llama-bin-win-cu12.2.0-x64.zip" --output "cudart-llama-bin-win-cu12.2.0-x64.zip"
curl -L "https://github.com/ggerganov/llama.cpp/releases/download/b3266/llama-b3266-bin-win-cuda-cu12.2.0-x64.zip" --output "llama-b3266-bin-win-cuda-cu12.2.0-x64.zip"

:: Creating submodules directory for Llama
echo Creating submodules directory for Llama...
mkdir submodules\llama.cpp

:: Unzipping Llama using PowerShell with overwrite
echo Unzipping Llama using PowerShell...
powershell -Command "Expand-Archive -Path 'cudart-llama-bin-win-cu12.2.0-x64.zip' -DestinationPath 'submodules\llama.cpp' -Force"
powershell -Command "Expand-Archive -Path 'llama-b3266-bin-win-cuda-cu12.2.0-x64.zip' -DestinationPath 'submodules\llama.cpp' -Force"

:: Cleaning up Llama zip files
echo Cleaning up...
del cudart-llama-bin-win-cu12.2.0-x64.zip
del llama-b3266-bin-win-cuda-cu12.2.0-x64.zip

echo Done!

if that doesn't work then... I don't know. Maybe the path in the following is wrong? GlaDOS\glados\whisper_cpp_wrapper.py on line 858

"add_library_search_dirs(['./submodules/whisper.cpp/'])  # add the path to the whisper.cpp submodule

# Begin libraries
_libs["whisper"] = load_library("whisper")"

You could change it to r"C:/Users/gamem/Desktop/GlaDOS-main/submodules/whisper.cpp/" like this.

thijsi123 commented 5 hours ago

That's all I can think of... Sorry if it doesn't help.

GameMelvin commented 5 hours ago

Traceback (most recent call last): File "C:\Users\gamem\Desktop\GlaDOS-main\glados.py", line 21, in from glados import asr, tts, vad File "C:\Users\gamem\Desktop\GlaDOS-main\glados\asr.py", line 6, in from . import whisper_cpp_wrapper File "C:\Users\gamem\Desktop\GlaDOS-main\glados\whisper_cpp_wrapper.py", line 861, in _libs["whisper"] = load_library("whisper") ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamem\Desktop\GlaDOS-main\glados\whisper_cpp_wrapper.py", line 547, in call raise ImportError("Could not load %s." % libname) ImportError: Could not load whisper.

I did the last thing by changing the code and this is the new error I get.

thijsi123 commented 5 hours ago

It's the same, no idea. Sorry.