summarizer

summarizer
git clone https://git.prime8.dev/summarizer.git
Log | Files | Refs | README | LICENSE

README.md (1816B)


      1 # Summarizer
      2 
      3 Transcribe and summarize audio files using OpenAI's Whisper and GPT-4.
      4 
      5 ## Architecture
      6 
      7 The application uses a microservices architecture with Kafka for message passing:
      8 
      9 ```
     10 ┌──────────┐    ┌───────────────┐    ┌──────────────┐    ┌────────────┐
     11 │ Frontend │───▶│ Transcriber   │    │ Summarizer   │───▶│  Response  │
     12 │ (FastAPI)│    │ (Whisper API) │    │ (GPT-4)      │    │            │
     13 └──────────┘    └───────────────┘    └──────────────┘    └────────────┘
     14                         ▲                    ▲
     15                         └────── Kafka ───────┘
     16 ```
     17 
     18 - **Frontend**: FastAPI web server accepting audio file uploads
     19 - **Transcriber**: Converts audio to text using OpenAI Whisper
     20 - **Summarizer**: Generates summaries using GPT-4 Turbo
     21 
     22 ## Setup
     23 
     24 1. Create an `openai.env` file in the project root:
     25    ```
     26    OPENAI_API_KEY=your_api_key_here
     27    ```
     28 
     29 2. Ensure `kafka.env` exists (already provided in the repo).
     30 
     31 ## Running
     32 
     33 ```bash
     34 docker compose up --build
     35 ```
     36 
     37 Navigate to http://localhost:8000 to upload an audio file.
     38 
     39 ## API
     40 
     41 ### `GET /`
     42 Returns an HTML form for file upload.
     43 
     44 ### `POST /`
     45 Upload an audio file. Returns JSON with transcription and summary:
     46 ```json
     47 {
     48   "text": "Full transcription...",
     49   "summary": "Summarized content..."
     50 }
     51 ```
     52 
     53 ## Services
     54 
     55 | Service | Port | Description |
     56 |---------|------|-------------|
     57 | frontend | 8000 | Web interface |
     58 | kafka | 9092 | Message broker |
     59 | zookeeper | 2181 | Kafka coordination |
     60 
     61 ## License
     62 
     63 [GPL-3.0](LICENSE)