An intelligent language learning application that helps users practice speaking in different languages through AI-powered conversations. The app provides real-time speech recognition, translation, and personalized feedback to improve language fluency.
- Real-time speech recognition in multiple languages (Spanish, French, Hindi, English)
- Voice-to-text conversion with Google Speech Recognition API
- Interactive conversations with AI native speakers
- Text-to-speech responses in the target language
- OpenAI GPT-3.5 Turbo integration for natural conversations
- Contextual responses that guide conversations on specific topics
- Automatic translation to English for better understanding
- Personalized feedback with fluency scoring (1-10 scale)
- Session statistics including time spent and number of practice sessions
- Performance analytics with average fluency scores
- Detailed feedback history with specific improvement suggestions
- Firebase integration for persistent data storage
- Firebase Authentication with email/password and Google sign-in
- Secure session management
- User dashboard with personalized experience
- Python 3.8 or higher
- Microphone for speech input
- Speakers for audio output
- OpenAI API key
- Firebase project with authentication and Firestore enabled
-
Clone the repository
git clone <repository-url> cd LingoLearn-AI
-
Create and activate virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the root directory:OPENAI_API_KEY=your_openai_api_key_here
-
Configure Firebase
- Download your Firebase service account key as
key.json - Place it in the root directory
- Enable Authentication and Firestore in your Firebase console
- Download your Firebase service account key as
python app.pyNavigate to http://localhost:5000 in your browser.
streamlit run app2.pyThe Streamlit interface will open automatically in your browser.
- Login with your email or Google account
- Select your target language (Spanish, French, Hindi)
- Click "Speak" to start voice recognition
- Have a conversation with the AI native speaker
- End the session to receive personalized feedback
- View your progress in the dashboard
- Launch the app and select "Chat" from the sidebar
- Set your language by clicking "Detect Language" or manually selecting
- Click "Speak" to begin voice recognition
- Practice conversation with the AI assistant
- End conversation to get detailed feedback
- Check statistics in the Statistics page
- Backend: Python, Flask, Streamlit
- AI/ML: OpenAI GPT-3.5 Turbo, LangChain
- Speech Processing: SpeechRecognition, Google Speech API
- Database: Firebase Firestore
- Authentication: Firebase Auth
- Frontend: HTML, CSS, JavaScript, Bootstrap
LingoLearn AI/
βββ app.py # Flask web application
βββ app2.py # Streamlit interface
βββ requirements.txt # Python dependencies
βββ key.json # Firebase service account key
βββ .env # Environment variables
βββ static/ # Static assets
β βββ css/
β βββ js/
βββ templates/ # HTML templates
β βββ base.html
β βββ index.html
β βββ dashboard.html
βββ venv/ # Virtual environment
- Sign up at OpenAI
- Generate an API key
- Add it to your
.envfile
- Create a Firebase project at Firebase Console
- Enable Authentication and Firestore
- Download service account key as
key.json - Configure authentication methods (Email/Password, Google)
The app uses Google's Speech Recognition API which requires an internet connection. Supported languages:
- Spanish (
es) - French (
fr) - Hindi (
hi) - English (
en)
- Contextual responses: AI maintains conversation context
- Topic guidance: AI introduces specific topics and questions
- Brief responses: Keeps conversations natural and engaging
- Language-specific voices: Different TTS voices for each language
- Fluency scoring: 1-10 rating based on conversation quality
- Specific improvements: 3 targeted suggestions with conversation citations
- Progress tracking: Historical data and performance trends
- Session analytics: Time spent, session count, average scores
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT-3.5 Turbo API
- Google for Speech Recognition and Text-to-Speech services
- Firebase for authentication and database services
- LangChain for AI/ML framework
- Streamlit for the interactive web interface
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Include error messages and system information
Happy Learning! ππ£οΈ