--- 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 ```bash 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 ```from video_accent_analyzer import VideoAccentAnalyzer # 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