This project is a web application that transcribes audio notes and generates quizzes from them. It uses OpenAI's Whisper for transcription and a GPT model for formatting notes and creating quizzes. The frontend is built with Streamlit, and the backend is a FastAPI application.
- Audio Transcription: Record audio directly in the browser or upload an audio file to get it transcribed.
- AI-Powered Note Formatting: Use different note styles (e.g., detailed, summary, bullet points) and custom templates to format the transcribed text.
- Automatic Quiz Generation: Automatically generate a multiple-choice quiz based on the content of your notes.
- Note Management: View, search, and filter your notes.
- Tagging System: Organize your notes with tags.
- Download and Share: Download your notes as Markdown files.
.
├── backend/
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI application
│ │ ├── database.py # Database logic
│ │ └── quiz.py # Quiz generation logic
│ └── requirements.txt # Backend dependencies
├── frontend/
│ ├── app.py # Streamlit application
│ └── requirements.txt # Frontend dependencies
└── README.md
- Python 3.7+
- pip
-
Clone the repository:
git clone <repository-url> cd <repository-name>
-
Set up the backend:
cd backend python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Set up the frontend:
cd ../frontend python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
The backend requires an OpenAI API key.
- Create a
.envfile in thebackenddirectory. - Add your OpenAI API key to the
.envfile:OPENAI_API_KEY="your-openai-api-key"
-
Start the backend server:
- Navigate to the
backenddirectory. - Make sure your virtual environment is activated.
- Run the following command:
uvicorn app.main:app --reload
- The backend will be running at
http://localhost:8000.
- Navigate to the
-
Start the frontend application:
- Navigate to the
frontenddirectory. - Make sure your virtual environment is activated.
- Run the following command:
streamlit run app.py
- The frontend will be accessible in your browser, usually at
http://localhost:8501.
- Navigate to the
The backend provides the following main API endpoints:
POST /transcribe/: Transcribes audio, formats notes, and generates a quiz.GET /notes/: Retrieves all notes.GET /notes/{note_id}: Retrieves a specific note by its ID.GET /notes/search/: Searches for notes by content and tags.GET /tags/: Retrieves all unique tags.POST /templates/upload/: Uploads a custom note formatting template.GET /templates/: Retrieves a list of available templates.