Skip to content

nasseralbess/structured_notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Notes Transcriber

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.

Features

  • 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.

Project Structure

.
├── 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

Getting Started

Prerequisites

  • Python 3.7+
  • pip

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-name>
  2. 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
  3. 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

Configuration

The backend requires an OpenAI API key.

  1. Create a .env file in the backend directory.
  2. Add your OpenAI API key to the .env file:
    OPENAI_API_KEY="your-openai-api-key"
    

Running the Application

  1. Start the backend server:

    • Navigate to the backend directory.
    • 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.
  2. Start the frontend application:

    • Navigate to the frontend directory.
    • 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.

API Endpoints

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.

About

A pipeline to extract helpful notes and quizzes on them from an audio, uploaded or recorded

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors