ferhatbou's picture
Update README.md
75917d6 verified

A newer version of the Gradio SDK is available: 5.34.2

Upgrade
metadata
title: Video Accent Analyzer
emoji: ๐ŸŽง
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

๐ŸŽง Video Accent Analyzer

A sophisticated Python-based tool that analyzes English accents in videos using advanced machine learning techniques. Supports multiple video sources and provides detailed accent analysis with interactive visualizations.

๐ŸŒŸ Features

Video Support

  • YouTube videos with browser cookie integration
  • Loom recordings
  • Direct MP4 video links
  • Local video file uploads

Accent Analysis

  • Detects 6 distinct English accents:
    • ๐Ÿ‡ฌ๐Ÿ‡ง British English
    • ๐Ÿ‡บ๐Ÿ‡ธ American English
    • ๐Ÿ‡ฆ๐Ÿ‡บ Australian English
    • ๐Ÿ‡จ๐Ÿ‡ฆ Canadian English
    • ๐Ÿ‡ฎ๐Ÿ‡ณ Indian English
    • ๐ŸŒ Neutral English
  • Provides confidence scores for accent detection
  • Assesses English proficiency level
  • Analyzes audio quality metrics

Technical Capabilities

  • Automatic video download and processing
  • Audio extraction and preprocessing
  • Multi-chunk analysis for improved accuracy
  • Real-time progress tracking
  • Interactive Plotly visualizations
  • Batch processing support

๐Ÿš€ Installation

pip install -r requirements.txt

๐Ÿ’ป Usage

Web Interface Start the application: python app.py Open the provided URL in your browser Enter a video URL or upload a video file Adjust the maximum duration (10-120 seconds) Click "Analyze Video"

Python API


# Initialize analyzer
analyzer = VideoAccentAnalyzer()

# Analyze video
results = analyzer.analyze_video_url("your_video_url", max_duration=30)

# Display results
analyzer.display_results(results) 

โš™๏ธ Technical Requirements

Python 3.7+ FFmpeg installed on system Required Python packages: gradio โ‰ฅ4.0.0 plotly โ‰ฅ5.0.0 torch transformers librosa soundfile yt-dlp browser-cookie3 โ‰ฅ0.19.1

๐Ÿ“Š Results

๐ŸŽฏ Best Practices

  • Use videos with clear audio and minimal background noise For Best Results Use videos under 2 minutes in length Ensure clear audio quality Single speaker per analysis Continuous speech segments Minimum background noise Known Limitations Multiple speakers may affect accuracy Heavy background noise can impact results Very short speech segments (<10s) may be less accurate Some region-restricted videos might not be accessible

๐Ÿ”ง Development

The project consists of three main components:
video_accent_analyzer.py: Core analysis engine app.py: Gradio web interface Supporting utilities for video processing