navigate · tab cycle · ? help

~/projects/summarizer

GitLab ->
pythondockerkafka

Transcribe and summarize audio files using OpenAI’s Whisper and GPT-4.

Architecture

The application uses a microservices architecture with Kafka for message passing:

┌──────────┐    ┌───────────────┐    ┌──────────────┐    ┌────────────┐
│ Frontend │───▶│ Transcriber   │    │ Summarizer   │───▶│  Response  │
│ (FastAPI)│    │ (Whisper API) │    │ (GPT-4)      │    │            │
└──────────┘    └───────────────┘    └──────────────┘    └────────────┘
                        ▲                    ▲
                        └────── Kafka ───────┘
  • Frontend: FastAPI web server accepting audio file uploads
  • Transcriber: Converts audio to text using OpenAI Whisper
  • Summarizer: Generates summaries using GPT-4 Turbo

Setup

  1. Create an openai.env file in the project root:

    OPENAI_API_KEY=your_api_key_here
    
  2. Ensure kafka.env exists (already provided in the repo).

Running

docker compose up --build

Navigate to http://localhost:8000 to upload an audio file.

API

GET /

Returns an HTML form for file upload.

POST /

Upload an audio file. Returns JSON with transcription and summary:

{
  "text": "Full transcription...",
  "summary": "Summarized content..."
}

Services

Service Port Description
frontend 8000 Web interface
kafka 9092 Message broker
zookeeper 2181 Kafka coordination

License

GPL-3.0