ChatBridge is an innovative communication platform that seamlessly bridges language barriers via WhatsApp. By leveraging advanced AI-driven translation models, ChatBridge translates messages in real-time, enabling fluid, natural conversations between people who speak different languages.
🚀 Visit the ChatBridge GitHub Pages site to explore interactive visualizations, watch the introduction video, and dive deeper into how ChatBridge operates. The site provides a comprehensive view of the project's architecture, performance analysis, and more.
- About the Project
- Features
- Project Architecture
- Getting Started
- Usage
- Performance Analysis
- Contributing
- License
- Contact
In a globally connected world, language differences should no longer pose a barrier to effective communication. ChatBridge addresses this challenge by offering a real-time translation service via WhatsApp. Whether you're a business owner dealing with international clients or an individual connecting with friends abroad, ChatBridge ensures your messages are understood, regardless of the language.
ChatBridge integrates with Twilio and uses AI-powered translation models to translate messages as they are sent and received, maintaining the context and tone of the conversation.
- Real-Time Translation: Messages are translated instantly, providing smooth, uninterrupted conversations across languages.
- Automatic Language Detection: Detects the language of incoming messages without manual input.
- Bidirectional Support: Translates both incoming and outgoing messages for seamless dialogue.
- Dynamic Target Management: Easily assign target numbers for your translations via simple WhatsApp commands.
- Advanced AI Models: Uses Hugging Face and Gemini models to ensure high-quality translations.
ChatBridge is built on a robust architecture that ensures reliable and accurate message translation:
- Twilio Integration: Handles the receipt and sending of WhatsApp messages.
- Language Detection API: Automatically identifies the language of incoming messages.
- Translation Models: Utilizes AI models (Hugging Face and Gemini) for translating messages.
- Backend Framework: Implemented using Python and Flask for efficient request handling and processing.
- CSV Handler: Manages language preferences and ISO codes for different WhatsApp numbers.
To get a local copy up and running, follow these steps.
Ensure you have the following installed:
- Python 3.7+
- Flask
- Twilio API credentials
- Hugging Face and Gemini API access
-
Clone the repository:
git clone https://github.com/IronHack-DataScientist/ChatBridge.git cd ChatBridge -
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.envfile in the root directory. - Add your Twilio and API credentials, along with any other necessary environment variables.
- Create a
Start the Flask server:
flask runThe application will start, and you can begin sending messages to your Twilio number to see translations in action.
- Start a Conversation: Send a message to the Twilio number associated with ChatBridge. The message will be translated into the recipient's language and forwarded.
- Assign a Target Number: Use the format
to:<target_number>to direct your translated messages to a specific WhatsApp number. - End a Session: Use the command
exitto clear the current target and end the session.
- Customer (English): "Hello, I would like to know more about your services."
- ChatBridge (Translation to Spanish): "Hola, me gustaría saber más sobre sus servicios."
- Business Owner (Spanish): "Claro, ¿cómo puedo ayudarte?"
- ChatBridge (Translation to English): "Sure, how can I help you?"
ChatBridge employs both Hugging Face and Gemini translation models. We've conducted detailed performance analysis to compare these models in terms of speed and accuracy.
- Implementation of Hugging Face Models
- Testing of Hugging Face Models
- Translation Model Comparison: A comprehensive comparison of how quickly each model translates different text types across various languages.
- Evaluation of Model Performance
The BLEU score is a key metric used to evaluate the quality of translations. Our analysis includes:
- Visualizing Model Performance
- BLEU Score Distribution: Histograms and box plots that show the BLEU score distribution across different text types and languages.
- Correlation Analysis: A scatter plot examining the correlation between translation times and BLEU scores, offering insights into the trade-offs between speed and quality.
We welcome contributions from the community! If you have a feature request, bug report, or would like to contribute code, please follow these steps:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
Please make sure to update tests as appropriate and adhere to the project's coding guidelines.
Distributed under the MIT License. See LICENSE for more information.
For inquiries or support, please reach out to:
- Your Name
- Email: info@customcodeint.com
- LinkedIn: Javier Esparza
- GitHub: JReuman1
This project is actively maintained and continually improving. We appreciate your feedback and contributions to make ChatBridge even better!