https://github.com/thekartikeyamishra/multi-language-chatbot
The Multi-Language Chatbot is a Python-based chatbot that allows users to communicate in multiple languages (e.g., English, Hindi, and Spanish). The chatbot uses pre-defined responses for common queries and a translation API to handle multi-language input.
https://github.com/thekartikeyamishra/multi-language-chatbot
application chatbot chatgpt gemini googletrans gtts llm openai python streamlit
Last synced: about 2 months ago
JSON representation
The Multi-Language Chatbot is a Python-based chatbot that allows users to communicate in multiple languages (e.g., English, Hindi, and Spanish). The chatbot uses pre-defined responses for common queries and a translation API to handle multi-language input.
- Host: GitHub
- URL: https://github.com/thekartikeyamishra/multi-language-chatbot
- Owner: thekartikeyamishra
- Created: 2024-12-11T19:54:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-26T16:14:00.000Z (over 1 year ago)
- Last Synced: 2025-05-16T08:09:20.569Z (about 1 year ago)
- Topics: application, chatbot, chatgpt, gemini, googletrans, gtts, llm, openai, python, streamlit
- Language: Python
- Homepage: https://topmate.io/kartikeyahere/1343010
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-Language-Chatbot
For the next 15 days, I'll be creating and sharing 15 projects – one per day! Free versions will be open to all on my GitHub, and a low-cost paid version will be available too. Can't wait to hear your thoughts!
The **Multi-Language Chatbot** is a Python-based chatbot that allows users to communicate in multiple languages (e.g., English, Hindi, and Spanish). The chatbot uses pre-defined responses for common queries and a translation API to handle multi-language input.
# Multi-Language Chatbot (Advanced Version)
## Overview
The **Multi-Language Chatbot** is an AI-powered chatbot capable of understanding and responding in multiple languages. This advanced version integrates **OpenAI's GPT-3/4**, **Google Translate API**, and voice interaction features, making it a powerful tool for global communication.
## Upgrade to the Advanced Multi-Language Chatbo with Enhanced Features for just **INR 299** at https://topmate.io/kartikeyahere/1343010
## Use the code **"chatbotnow"** at checkout to get **25% off instantly. (Advanced Version) **
---
## What Is It? (Advanced Version)
The Multi-Language Chatbot is a sophisticated conversational assistant that:
1. **Understands and responds in multiple languages**: Supports English, Hindi, Spanish, French, German, Mandarin, and more.
2. **Voice Interaction**: Allows users to communicate through voice input and hear responses in real-time.
3. **Contextual Understanding**: Powered by LLMs (GPT-3/4) for intelligent and context-aware responses.
4. **Web & Desktop Support**: Includes a desktop GUI and a Streamlit-based web interface.
---
## Why Use It? (Advanced Version)
1. **Global Reach**: Ideal for businesses, educators, or developers needing multi-lingual communication tools.
2. **Ease of Use**: Non-coders can use the GUI or Streamlit dashboard without writing a single line of code.
3. **Adaptability**: Supports expansion for custom domains or industries with additional languages and fine-tuned models.
4. **Cutting-Edge AI**: Leverages state-of-the-art LLMs and APIs for superior performance.
---
## How Does It Work? (Advanced Version)
1. Users enter a query in their preferred language.
2. The chatbot translates the query to English for processing (if needed).
3. GPT-3/4 generates a context-aware response.
4. The response is translated back to the user’s language (if required).
5. Voice input and output enhance accessibility.
---
### Key Features (Advanced Version)
- **Multi-Language Support**: Communicate in multiple languages with seamless translation.
- **LLM Integration**: Generate intelligent, context-aware responses.
- **Voice Interaction**: Speak queries and hear responses in real-time.
- **Conversation History**: Stores chat history for reference.
- **Web and Desktop Interfaces**: Access via a Tkinter GUI or a Streamlit dashboard.
---
## Folder Structure (Advanced Version)
```bash
MultiLanguageChatbot/
├── data/
│ ├── responses.json # Backup pre-defined responses for fallback
├── gui/
│ ├── __init__.py # Initializes the GUI module
│ ├── chatbot_gui.py # GUI implementation using Tkinter
├── streamlit_app/
│ ├── app.py # Streamlit-based advanced chatbot
├── utils/
│ ├── __init__.py # Initializes the utils module
│ ├── translation_api.py # Logic for translating text
│ ├── response_logic.py # LLM-based response generation logic
│ ├── voice_handler.py # Logic for voice input and output
│ ├── conversation_store.py # Logic to store and manage conversation history
├── main.py # Entry point to run the chatbot
├── requirements.txt # Dependencies required for the project
├── README.md # Documentation for the project
├── LICENSE # License file
### README File
```markdown
## Overview
The **Multi-Language Chatbot** is a Python-based chatbot that allows users to communicate in multiple languages (e.g., English, Hindi, and Spanish). The chatbot uses pre-defined responses for common queries and a translation API to handle multi-language input.
This project is designed to provide a simple chatbot experience with multi-language support via a clean and user-friendly GUI built with **Tkinter**.
---
## Features
- **Multi-Language Support**:
- Communicate in English (`en`), Hindi (`hi`), and Spanish (`es`).
- **Pre-Defined Responses**:
- Chatbot responds to common queries like greetings, help, and goodbyes.
- **Translation API**:
- Automatically translates user queries to English for processing and then back to the user’s chosen language.
- **Simple GUI**:
- A Tkinter-based graphical interface for sending and receiving messages.
---
## Folder Structure (Basic Version)
Below is the folder structure of the project:
```bash
MultiLanguageChatbot/
├── data/
│ ├── responses.json # Pre-defined responses for different languages
├── gui/
│ ├── __init__.py # Initializes the GUI module
│ ├── chatbot_gui.py # GUI implementation using Tkinter
├── utils/
│ ├── __init__.py # Initializes the utils module
│ ├── translation_api.py # Logic for translating text using Google Translate API
│ ├── response_logic.py # Logic to fetch responses based on user queries
├── main.py # Entry point to run the chatbot
├── requirements.txt # Dependencies required for the project
├── README.md # Documentation for the project
```
---
## Installation and Setup (Basic Version)
### Prerequisites (Basic Version)
Make sure you have the following installed on your system:
- **Python 3.8+**
- **pip**: Python's package manager.
---
### Installation Steps (Basic Version)
1. **Clone the Repository**
```bash
git clone https://github.com/thekartikeyamishra/MultiLanguageChatbot.git
cd MultiLanguageChatbot
```
2. **Set Up Virtual Environment**
Create and activate a virtual environment to isolate dependencies:
- On **Windows**:
```bash
python -m venv .venv
.venv\Scripts\activate
```
- On **macOS/Linux**:
```bash
python -m venv .venv
source .venv/bin/activate
```
3. **Install Dependencies**
Install the required Python packages:
```bash
pip install -r requirements.txt
```
4. **Run the Application**
Start the application by running the `main.py` script:
```bash
python main.py
```
---
## How to Use (Basic Version)
1. Launch the chatbot by running `main.py`.
2. Select your preferred language from the dropdown menu (English, Hindi, or Spanish).
3. Type your message in the input field and click the **"Send"** button.
4. The chatbot will process your query and respond in the selected language.
5. Continue the conversation or change the language anytime.
---
## Example Interaction (Basic Version)
**Example in English**:
```
You: Hello
Bot: Hello! How can I assist you?
You: Goodbye
Bot: Goodbye! Have a great day!
```
**Example in Hindi**:
```
You: नमस्ते
Bot: नमस्ते! मैं आपकी कैसे मदद कर सकता हूँ?
You: अलविदा
Bot: अलविदा! आपका दिन शुभ हो!
```
**Example in Spanish**:
```
You: Hola
Bot: ¡Hola! ¿Cómo puedo ayudarte?
You: Adiós
Bot: ¡Adiós! ¡Que tengas un gran día!
```
---
## Dependencies (Basic Version)
The project uses the following Python libraries:
- **googletrans**: For translating text between languages.
- **tkinter**: For building the graphical user interface.
- **json**: For managing pre-defined responses.
To install all dependencies, run:
```bash
pip install -r requirements.txt
```
---
## Acknowledgments (Basic Version)
- **Google Translate API**: Used for multi-language translation.
- **Python**: The programming language used to build this chatbot.
- **Tkinter**: For the graphical user interface.
- * LinkedIn : https://www.linkedin.com/in/thekartikeyamishra/
```
---
Here's how the folder structure will look: (Basic Version)
MultiLanguageChatbot/
├── data/
│ ├── responses.json # Pre-defined responses for different languages
│ └── # Example JSON structure
├── gui/
│ ├── __init__.py # Initializes the GUI module
│ ├── chatbot_gui.py # GUI implementation using Tkinter
├── utils/
│ ├── __init__.py # Initializes the utils module
│ ├── translation_api.py # Logic for translating text using Google Translate API
│ ├── response_logic.py # Logic to fetch responses based on user queries
├── main.py # Entry point to run the chatbot
├── requirements.txt # Dependencies required for the project
├── README.md # Documentation for the project