AI After Life — AI-Powered Memorial Persona Chat System with Voice Cloning and WhatsApp Training
Back to ProjectBefore you begin, make sure you have the following installed on your system:
sudo apt install espeak on Ubuntu/Linux or brew install espeak on macOSOpen your terminal and run the following commands to download the project:
git clone <repo-url>
cd "AI-After-Life"
Setting up an isolated Python environment prevents dependency conflicts with other projects on your machine:
python -m venv venv
source venv/bin/activate
If you are on Windows, use this activation command instead:
venv\Scripts\activate
Install all required libraries listed in the requirements file:
pip install -r requirements.txt
This will install Django, Django REST Framework, Groq client, Coqui TTS, Bark, librosa, PyTorch, and all other dependencies. The installation may take several minutes depending on your internet speed and whether PyTorch needs to download CUDA binaries.
The application requires certain sensitive configuration values. Set them as environment variables before running the server:
export SECRET_KEY="your-django-secret-key-here"
export GROQ_API_KEY="your-groq-api-key-here"
export DEBUG=True
export ALLOWED_HOSTS="localhost,127.0.0.1"
On Windows, replace export with set. Alternatively, you can create a .env file in the project root directory and use a package like python-decouple or django-environ to load the values automatically.
To get a Groq API key, sign up at console.groq.com and generate a free API key from the dashboard.
Create the database tables required by the application:
python manage.py migrate
Create an admin account that you can use to log in:
python manage.py createsuperuser
Follow the terminal prompts to enter a username, email address, and password.
Open a separate terminal window and start Redis, which is used as the message broker for background tasks:
redis-server
Keep this terminal running throughout your session. If Redis is not installed, you can install it on Ubuntu with sudo apt install redis-server or on macOS with brew install redis.
Open the file memorial_ai/settings.py and configure your preferred voice cloning engine:
VOICE_CLONE_ENGINE = "coqui"
MAX_VOICE_SAMPLE_DURATION = 120
Available options are coqui for Coqui TTS XTTS v2 (highest quality), bark for Bark TTS (experimental), or fallback which returns silent audio if voice cloning is not needed.
Run the Django development server:
python manage.py runserver
Open your web browser and navigate to:
http://127.0.0.1:8000
Log in with the superuser credentials you created in Step 6. You will be taken to the Dashboard where you can begin creating memorial personas.
Follow these steps to create and interact with your first persona:
For deploying this project beyond local development, make the following changes:
DEBUG=False in your environment variablesSECRET_KEYALLOWED_HOSTS with your actual domain nameOur team is here to assist you with installation and setup.