This script emulates GLaDOS from Portal 1 and 2 using AI. At specified intervals, the AI analyzes the screen and provides a sarcastic comment in monologue mode, using GLaDOS's voice.
Example of a response:
description.webm
To install, follow these steps:
- Clone the repository to your device.
- Install the necessary dependencies by running
pip install -r requirements.txt
. - Create a
config.yaml
file based onconfig_template.yaml
and fill in the required parameters such asapi_key
,temperature
,top_p
,top_k
, and others. - Launch the application by running
python glados.py
.
Once launched, GLaDOS will periodically describe the content of the screen and vocalize the obtained descriptions using synthesized speech.
You can adjust the frequency of comments and other parameters in the config.yaml
file.
The config.yaml
file allows you to customize various aspects of the application:
- Choose between Ollama and Gemini as the inference engine
- Set screenshot capture settings
- Adjust sleep intervals between comments
- Configure model-specific parameters for both Ollama and Gemini
- Enable or disable translation of responses to Russian
- Customize TTS settings
- Screen capture and analysis
- AI-powered image description using either Ollama or Gemini
- Character role-playing as GLaDOS
- Text-to-speech synthesis using GLaDOS's voice
- Optional translation of responses from English to Russian
- Configurable comment frequency and sleep intervals
glados.py
: The main executable file of the application.config.yaml
: Configuration file containing application parameters.config_template.yaml
: Template for creating your own configuration file.requirements.txt
: List of Python dependencies for the project.
- yaml
- pillow
- TeraTTS
- ruaccent
- google-generativeai
- transliterate
- ollama
- transformers