Skip to content

Video Transcript Analysis System with Gemini API Integration #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Konikz
Copy link

@Konikz Konikz commented Mar 28, 2025

This PR if my contribution for GSoC which adds a comprehensive Video Transcript Analysis System that leverages Google's Gemini API to process video transcripts and answer complex questions. The system is designed with production-readiness in mind, featuring robust error handling, caching, and comprehensive test coverage.

Key Features

  • Transcript Processing: Intelligent chunking with semantic awareness and timestamp parsing
  • Question Optimization: Analyzes question dependencies and optimizes processing order
  • Gemini API Integration: Robust integration with retry logic and rate limiting
  • Hybrid Caching: Multi-layer caching system with semantic search capabilities
  • FastAPI Endpoints: RESTful API for transcript analysis and cache management
  • Production Ready: Includes monitoring, logging, and comprehensive error handling
  • Docker Support: Multi-stage build for optimized container images
  • CI/CD Pipeline: GitHub Actions workflow for testing and deployment

Usage Example

from video_transcript_analysis.core.orchestrator import TranscriptAnalyzer

# Initialize the analyzer
analyzer = TranscriptAnalyzer()

# Analyze a transcript
result = await analyzer.analyze_transcript(
    video_id="video123",
    transcript="[00:00] Welcome to the video...",
    questions=[
        "What is the main topic?",
        "Who are the key speakers?",
        "What are the three main points discussed?"
    ]
)

# Access the results
for question, answer in zip(result.questions, result.answers):
    print(f"Q: {question}")
    print(f"A: {answer}\n")

API Endpoints

  • POST /analyze: Process a video transcript and answer questions
  • DELETE /cache/{video_id}: Clear cache for a specific video
  • GET /health: Health check endpoint

Testing

The PR includes comprehensive test coverage for all major components:

  • Transcript processing and chunking
  • Question dependency analysis and optimization
  • Caching system
  • API integration

To run tests:

pytest tests/ --cov=src

…n, question optimization, caching, and CI/CD
Copy link

google-cla bot commented Mar 28, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@shari759
Copy link

Konikz:feature/video-transcript-analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants