Run the application locally using any of the explained setups. An essential initial step before any of the steps outlined is cloning this repository and navigating to the project directory by entering these commands in your terminal:
git clone https://github.com/abduIbasit/Real-Time-Conversational-AI-Model-with-Avatar-and-Gestures.git
cd Real-Time-Conversational-AI-Model-with-Avatar-and-Gestures
After navigating to the project directory, follow the steps for any of the setups to run.
Ensure you have Python 3.8 or higher installed.
Create a virtual environment (recommended):
python -m venv env
source env/bin/activate
Run the below command from the directory where the requirements.txt is to install the packages
pip install -r requirements.txt
Set environment variables for GROQ_API and D-ID in .env file in the root directory
-
GROQ API keys can be obtained from https://console.groq.com/keys
-
D-ID API https://www.d-id.com/api/
Run the application with the following command:
uvicorn main:app --host 0.0.0.0 --port 8000
The application would be accessible at ws://localhost:8000/ws/conversation.
Interact with the application via any websocket client. Request expects the following parameters:
session_id: required - A session id for conversation history management.
prompt: optional - A prompt text which the model responds to.
audio: optional - An audio blob or voice recording which the model responds to.
Note: One of either prompt or audio needs to be sent but not both. Here is an example request body:
{
"session_id": "xgsj5207dcjdpkql1",
"prompt": "What are large language models"
}
Response body is a text response from the model and an avatar demonstration
Alternatively, interact with the application using the frontend application I developed by cloning the repo https://github.com/abduIbasit/Real-Time-Conversational-AI-Model-with-Avatar-and-Gestures-Frontend.git
To run with make
, ensure you have make
and python
installed on your computer.
- Simply set up and run the application in one go by entering this command in your terminal:
make setup
- Stop the application with:
make stop
- Clean up and remove the virtual environment with:
make clean
To run the application on Docker, follow the steps below.
docker build -t conversational-ai-app .
docker run -p 8000:8000 conversational-ai-app
After running the container, the application would be accessible at ws://localhost:8000/ws/conversation.
Interact with the application following the step
Read the application development documentation here: docs