This is a project dedicated to building a real-life version of GLaDOS.
NEW: If you want to chat or join the community, Join our discord!
This is a hardware and software project that will create an aware, interactive, and embodied GLaDOS.
This will entail:
The initial goals are to develop a low-latency platform, where GLaDOS can respond to voice interactions within 600ms.
To do this, the system constantly records data to a circular buffer, waiting for voice to be detected. When it's determined that the voice has stopped (including detection of normal pauses), it will be transcribed quickly. This is then passed to streaming local Large Language Model, where the streamed text is broken by sentence, and passed to a text-to-speech system. This means further sentences can be generated while the current is playing, reducing latency substantially.
This will be based on servo- and stepper-motors. 3D printable STL will be provided to create GlaDOS's body, and she will be given a set of animations to express herself. The vision system will allow her to track and turn toward people and things of interest.
Don't want to compile anything? Try this simplified process, but be aware it's still in the experimental stage!
python
and install Python 3.12.
a. To use Python 3.10, install typing_extensions
and replace import typing
in glados/llama.py
with import typing_extensions
.install_windows.bat
. During the process, you will be prompted to install eSpeak-ng, which is necessary for GLaDOS's speech capabilities. This step also downloads the Whisper voice recognition model and the Llama-3 8B model.start_windows.bat
script.This is still experimental. Any issues can be addressed in the Discord server. If you create an issue related to this, you will be referred to the Discord server.
install_mac.sh
. If you don't do this, it will install it for you (Not tested).git clone
this repository using git clone github.com/dnhkng/glados.git
install_mac.sh
. If you do not have Python installed, then you will run into an error.start_mac.sh
to start GLaDOSIf you want to install the TTS Engine on your machine, please follow the steps below. This has only been tested on Linux, but I think it will work on Windows with small tweaks. If you are on Windows, I would recommend WSL with an Ubuntu image. Proper Windows and Mac support is in development.
espeak
synthesizer
according to the installation
instructions
for your operating system.pip install -r requirements.txt
on Mac or Linux systems without an Nvidia GPU, and pip install -r requirements_cuda.txt
if you have a modern Nvidia GPU.git submodule update --init --recursive
cd submodules/whisper.cpp
WHISPER_CUDA=1 make libwhisper.so -j
make libwhisper.so -j
. For Apple silicon devices, it is also possible to compile using Core ML like this WHISPER_COREML=1 make libwhisper.so -j
,
but it may be unnecessary--modern Macs are fast enough without it--and if you do, don't forget to follow the instructions to generate Core ML models.git submodule update --init --recursive
to pull the llama.cpp repocd submodules/llama.cpp
completion_url
to the URL of your local serverapi_key
If you have an error about packages or files not being found, make sure you have the whisper and llama binaries in the respective submodules folders! They are empty by default, and you manually have to add the binaries as described above!
Make sure you are using the right Llama-3 Model! I have made Llama-3 8B, with the quantization Q6_K the default. You might need to redownload the model if you don't have Meta-Llama-3-8B-Instruct-Q6_K.gguf
in your models folder!
If you have limited VRAM, you can save 3Gb by using downloading a highly quantised IQ3_XS model and moving it to the models folder. If you do this, modify the glados_config.yaml
to modify the model used: model_path: "./models/Meta-Llama-3-8B-Instruct-IQ3_XS.gguf"
If you find you are getting stuck in loops, as GLaDOS is hearing herself speak, you have two options:
glados_config.yaml
, and change interruptible:
to false
.Prerequisite WSL2 with fresh drivers, here is guide https://docs.docker.com/desktop/gpu/
git submodule update --init --recursive
docker build -t glados .
docker run -e "PULSE_SERVER=/mnt/wslg/PulseServer" -v "/mnt/wslg/:/mnt/wslg/" --gpus=all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 glados
It works in ubuntu terminal started with WSL2
To start GLaDOS, use:
python glados.py
You can stop with "Ctrl-c".
You can test the systems by exploring the 'demo.ipynb'.