GenAI Talking Avatar ChatBot using Streamlit and Anthropic Claude LLM Model
GenAI-Talking-Avatar-Chatbot is a web application that allows users to interact with an AI-powered talking chatbot with a static avatar. The chatbot uses AWS Bedrock for generating responses and Google Text-to-Speech (gTTS) for voice output. The backend is built with FastAPI, and the frontend uses Streamlit for the user interface.
FeaturesAPI Backend (api.py)- Provides an API endpoint to handle chat requests.
- Uses AWS Bedrock to generate AI responses in a specified JSON format.
- Ensures the responses include the message, avatar expression, and voice tone.
- Includes a health check endpoint to verify the API status.
- Chat Interface: Provides a chat interface where users can input their queries and receive responses from the AI assistant.
- Avatar Display: Displays an avatar that changes expressions based on the AI assistant's responses and actions (e.g., thinking, speaking).
- AI Response Handling: Sends user queries to an AI backend server and processes the responses to display clean messages in the chat interface.
- Text-to-Speech: Converts the AI assistant's text responses into speech using Google Text-to-Speech (gTTS) and plays the audio using Pygame.
- Session Management: Maintains the chat history and current avatar expression using Streamlit's session state.
- Error Handling: Handles errors gracefully, displaying appropriate error messages to the user.
GitHub Repo: Clone and use latest code from here.
Comments