Skip to content

Add ASR transcript summarization

Lakshmi pavani Challa requested to merge feat/summarization_of_asr into main

Here’s a polished, professional PR/feature description based on your points 👇


Title

Add ASR Transcript Summarization Feature with OpenAI Integration and Fallback Support


📄 Description (Recommended)

This update introduces a comprehensive summarization feature for ASR-generated transcripts, enabling users to quickly extract key insights from speech-to-text output.

🚀 Backend Enhancements

  • Added a new summarization service in app/summarizer.py

    • Integrated OpenAI-based summary generation
    • Implemented retry mechanism with anti-copy safeguards
    • Added local fallback summarization when API is unavailable
    • Supports both short and bullet-point summary formats
  • Introduced a new API endpoint in app/main.py:

    • POST /api/summarize

    • Request parameters:

      • text (required)
      • summary_type (short | bullet)
      • max_sentences (1–100)
      • max_words (20–4000)
    • Response includes summarized text along with basic length metadata


🎨 Frontend Updates

  • Added a new summary section in templates/index.html

  • Implemented summarization flow in static/app.js:

    • Allows users to generate summaries from current transcripts
    • Handles loading and error states gracefully
    • Displays guidance when API key is missing

Configuration & Dependencies

  • Added OpenAI configuration in app/config.py:

    • OPENAI_API_KEY
    • OPENAI_MODEL (default: gpt-4o-mini)
    • OPENAI_BASE_URL
  • Updated requirements.txt with:

    • openai
    • huggingface_hub

🧪 Testing

  • Added tests/test_summarizer.py covering:

    • Similarity guard behavior
    • Retry handling for repeated outputs
    • Fallback summarization logic
    • Bullet-format output validation

💡 Impact

This feature significantly improves usability by allowing users to quickly understand long transcripts, while ensuring reliability through fallback mechanisms and robust error handling.


screenshots

image

Merge request reports

Loading