AI-Digi-Ellie is an AI-powered companion. She can operate in two modes:
- Discord mode: Runs as a Discord bot when provided with a Discord token
- Console mode: Runs in console for local testing when no token is provided
- AI-powered conversation capabilities
- Discord integration using the D++ library
- Text-to-Speech support using Azure Cognitive Services
- Speech-to-Text support using Whisper.cpp (local processing)
- Voice chat interaction in Discord
- Supports both Discord bot and console modes
- CMake 3.10 or higher
- C++20 compatible compiler
- Git (for cloning the repository)
- OpenSSL 3.0 or higher (for secure connections)
- Opus development libraries (for voice processing)
The project uses the following libraries (included as submodules):
- D++ - A lightweight C++ Discord library
- nlohmann/json - JSON for Modern C++
- spdlog - Fast C++ logging library
- cpp-httplib - A C++ HTTP/HTTPS client library
- whisper.cpp - C++ implementation of OpenAI's Whisper model
The project uses environment variables for configuration. Set the following variables before running:
DIGI_ELLIE_DISCORD_TOKEN
- Your Discord bot tokenDIGI_ELLIE_DEFAULT_CHANNEL_ID
- Discord channel ID for boot messages
DIGI_ELLIE_MODEL_NAME
- Ollama model name (default: "mistral")
To enable TTS functionality, set these environment variables:
DIGI_ELLIE_AZURE_SPEECH_KEY
- Your Azure Cognitive Services subscription keyDIGI_ELLIE_AZURE_SPEECH_REGION
- Azure region (default: "germanywestcentral")DIGI_ELLIE_AZURE_SPEECH_VOICE
- Voice to use (default: "en-US-JennyNeural")DIGI_ELLIE_AZURE_SPEECH_APP_NAME
- Application name for Azure requests
The Whisper STT service runs as a separate process and can be configured with:
DIGI_ELLIE_WHISPER_MODEL_NAME
- Whisper model file name (default: "ggml-large-v3-turbo-q8_0.bin")DIGI_ELLIE_WHISPER_SERVICE_HOST
- Host for the Whisper service (default: "0.0.0.0")DIGI_ELLIE_WHISPER_SERVICE_PORT
- Port for the Whisper service (default: 8000)
- Clone the repository with submodules:
git clone --recursive https://github.com/yourusername/AI-Digi-Ellie.git
cd AI-Digi-Ellie
- Create a build directory:
mkdir build
- Generate build files with CMake:
cd build; cmake ..; cd ..
- Build the project:
cmake --build build --config Release
- Clone the repository with submodules:
git clone --recursive https://github.com/yourusername/AI-Digi-Ellie.git
cd AI-Digi-Ellie
- Create a build directory:
mkdir build
- Generate build files with CMake:
cd build
cmake .. -G "Visual Studio 17 2022" -A x64
cd ..
- Build the project:
cmake --build build --config Release
The build process will automatically download the Whisper model file (approximately 4GB) during the first build.
- Ensure OpenSSL 3.0 or higher is installed on your system
- Make sure the OpenSSL development libraries are available
- On Windows, ensure OpenSSL DLLs are in your system PATH or install OpenSSL using:
winget install ShiningLight.OpenSSL
- Install the Opus development libraries:
- Ubuntu/Debian:
sudo apt-get install libopus-dev
- Fedora/RHEL:
sudo dnf install opus-devel
- Arch Linux:
sudo pacman -S opus
- Windows: Opus is included with the DPP library
- Ubuntu/Debian:
- Make sure Ollama is installed and running
- Ensure your chosen model is downloaded in Ollama (e.g.,
ollama pull mistral
) - Set the
DIGI_ELLIE_OLLAMA_HOST
environment variable to the host of your Ollama server (default: "localhost")
- Create a Discord application and bot in the Discord Developer Portal
- Enable Message Content Intent in the bot settings
- Add the bot to your server with appropriate permissions (text, voice)
- Create an Azure account and subscribe to Azure Cognitive Services
- Create a Speech Service resource in your preferred region
- Get your subscription key and region from the Azure portal
- Set the required environment variables for TTS
Set the required environment variables:
export DIGI_ELLIE_DISCORD_TOKEN="your_discord_token"
export DIGI_ELLIE_DEFAULT_CHANNEL_ID="your_channel_id"
export DIGI_ELLIE_AZURE_SPEECH_KEY="your_azure_speech_key"
Set the required environment variables:
set DIGI_ELLIE_DISCORD_TOKEN=your_discord_token
set DIGI_ELLIE_DEFAULT_CHANNEL_ID=your_channel_id
set DIGI_ELLIE_AZURE_SPEECH_KEY=your_azure_speech_key
The Whisper service needs to be running for voice recognition to work:
./build/bin/whisper_service
.\build\bin\Release\whisper_service.exe
You can run the Whisper service on a different machine. If you do, set the service URL in the bot:
export DIGI_ELLIE_WHISPER_SERVICE_HOST="your_whisper_server_ip"
export DIGI_ELLIE_WHISPER_SERVICE_PORT="your_whisper_server_port"
./build/bin/AI-Digi-Ellie
.\build\bin\Release\AI-Digi-Ellie.exe
Once the bot is running:
- Join a voice channel
- Use the
/joinvoice
command to make the bot join your channel and start recording audio - The bot will transcribe the recorded audio using Whisper and respond to you
src/
- Source filesinclude/
- Header filesvendor/
- Third-party dependenciesDPP/
- D++ Discord libraryjson/
- nlohmann/json libraryspdlog/
- spdlog logging librarycpp-httplib/
- HTTP/HTTPS client librarywhisper.cpp/
- Whisper speech recognition library
whisper_models/
- Directory for Whisper model files
- If you encounter errors about missing DLLs, ensure that OpenSSL is properly installed and in your PATH
- Make sure all development libraries are installed (OpenSSL, Opus)
- If you encounter permission issues when running the executables, use
chmod +x
to make them executable
This project is licensed under the terms of the LICENSE file included in the repository.