A newer version of the Gradio SDK is available:
5.34.2
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