CoolFace
Apppublic

ferhatbou/detect_English_language_speaking

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
README.md106 linesDownload Raw Back to root
1---2title: Video Accent Analyzer3emoji: ๐ŸŽง4colorFrom: green5colorTo: blue6sdk: gradio7sdk_version: 5.33.18app_file: app.py9pinned: false10---11 12Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference13 14# ๐ŸŽง Video Accent Analyzer15 16A 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.17 18## ๐ŸŒŸ Features19 20### Video Support21- YouTube videos with browser cookie integration22- Loom recordings23- Direct MP4 video links24- Local video file uploads25 26### Accent Analysis27- Detects 6 distinct English accents:28  - ๐Ÿ‡ฌ๐Ÿ‡ง British English29  - ๐Ÿ‡บ๐Ÿ‡ธ American English30  - ๐Ÿ‡ฆ๐Ÿ‡บ Australian English31  - ๐Ÿ‡จ๐Ÿ‡ฆ Canadian English32  - ๐Ÿ‡ฎ๐Ÿ‡ณ Indian English33  - ๐ŸŒ Neutral English34- Provides confidence scores for accent detection35- Assesses English proficiency level36- Analyzes audio quality metrics37 38### Technical Capabilities39- Automatic video download and processing40- Audio extraction and preprocessing41- Multi-chunk analysis for improved accuracy42- Real-time progress tracking43- Interactive Plotly visualizations44- Batch processing support45 46## ๐Ÿš€ Installation47 48```bash49pip install -r requirements.txt50 51```52# ๐Ÿ’ป Usage53Web Interface54Start the application:55python app.py56Open the provided URL in your browser57Enter a video URL or upload a video file58Adjust the maximum duration (10-120 seconds)59Click "Analyze Video"60 61# Python API62```from video_accent_analyzer import VideoAccentAnalyzer63 64# Initialize analyzer65analyzer = VideoAccentAnalyzer()66 67# Analyze video68results = analyzer.analyze_video_url("your_video_url", max_duration=30)69 70# Display results71analyzer.display_results(results) 72```73 74# โš™๏ธ Technical Requirements75Python 3.7+76FFmpeg installed on system77Required Python packages:78gradio โ‰ฅ4.0.079plotly โ‰ฅ5.0.080torch81transformers82librosa83soundfile84yt-dlp85browser-cookie3 โ‰ฅ0.19.186 87## ๐Ÿ“Š Results88๐ŸŽฏ Best Practices89- Use videos with clear audio and minimal background noise90For Best Results91Use videos under 2 minutes in length92Ensure clear audio quality93Single speaker per analysis94Continuous speech segments95Minimum background noise96Known Limitations97Multiple speakers may affect accuracy98Heavy background noise can impact results99Very short speech segments (<10s) may be less accurate100Some region-restricted videos might not be accessible101 102# ๐Ÿ”ง Development103The project consists of three main components:  104video_accent_analyzer.py: Core analysis engine105app.py: Gradio web interface106Supporting utilities for video processing