This project is an AI-powered language learning tool that allows users to create custom word lists, generate quizzes, and interact with a chatbot for language practice.
The project consists of the following main files and directories:
language/
: Main package directoryapp.py
: Contains the main application logic, including the Flask API, Gradio interface, and core functionality.modules/
: Directory containing additional modulesFileHandling.py
: Handles file operations and audio generation.ReviewWords.py
: Responsible for the review and quiz logic.
word_lists/
: Directory containing word lists for different languagesgerman/
,spanish/
: Directories for German and Spanish word lists, each containing aword_list.yaml
file.
pyproject.toml
: Defines the project metadata and dependencies using Poetry.
To set up and run this project, follow these steps:
If you haven't already installed Poetry, you can do so by running:
bash curl -sSL https://install.python-poetry.org | python3 -
Clone the repository to your local machine:
bash git clone https://github.com/your-username/ai-assisted-language-quizzzer.git
cd ai-assisted-language-quizzzer
Use Poetry to install the project dependencies:
bash poetry install
This command will install all the required packages listed in the pyproject.toml
file, including:
- Python 3.11
- deepl
- gradio
- soundfile
- contractions
Set up the following environment variables:
DEEPL_API_KEY
: Your DeepL API key (required for translation services)
You can set these variables in your shell or create a .env
file in the project root.
Update the following configuration files:
-
In
language/app.py
:- Update the
deepl_api
variable with your actual DeepL API key.
- Update the
-
In
language/modules/FileHandling.py
:- Update the
all_talk_url
variable in theGenerateAudio
class constructor with your All-Talk AI server URL.
- Update the
Activate the Poetry virtual environment and start the application:
bash poetry shell python language/app.py
The application will start on http://localhost:8002
.
- Create new words using the Gradio interface
- Save word lists to YAML files in the
word_lists
directory
- Generate quiz questions based on saved word lists
- Include audio and image options for enhanced learning
- Interact with a chatbot for language practice
- Submit answers and receive feedback
- Uses DeepL for translating words and phrases
- Supports automatic language detection and translation
Contributions are welcome! Please feel free to submit pull requests.
This project is licensed under the AGPLv3