Amr-h commited on
Commit
a7a25f4
Β·
1 Parent(s): 0ca3a79

update Readme

Browse files
Files changed (1) hide show
  1. README.md +118 -1
README.md CHANGED
@@ -17,4 +17,121 @@ license: apache-2.0
17
  Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
 
19
  If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
 
19
  If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
+ forums](https://discuss.streamlit.io).
21
+
22
+
23
+ 🎀 English Accent Analyzer
24
+ Streamlit App
25
+ PyTorch
26
+
27
+ A tool to identify English accents from audio/video sources with optimized processing for large files.
28
+
29
+ πŸš€ Features
30
+ Supports local files, direct media URLs, and Loom videos
31
+
32
+ Automatically splits large files into 1-minute chunks
33
+
34
+ Early stopping for faster analysis
35
+
36
+ Confidence-based predictions
37
+
38
+ Interactive Streamlit dashboard
39
+
40
+ βš™οΈ Installation
41
+ Clone the repository:
42
+
43
+ bash
44
+ git clone https://github.com/your-username/accent-analyzer.git
45
+ cd accent-analyzer
46
+ Install dependencies:
47
+
48
+ bash
49
+ pip install -r requirements.txt
50
+ Install FFmpeg (required for audio processing):
51
+
52
+ bash
53
+ # On Ubuntu/Debian
54
+ sudo apt install ffmpeg
55
+
56
+ # On macOS
57
+ brew install ffmpeg
58
+ πŸ–₯️ Usage
59
+ Run the Streamlit app:
60
+
61
+ bash
62
+ streamlit run app.py
63
+ The app will open in your browser at http://localhost:8501
64
+
65
+ πŸ“₯ Input Options
66
+ 1. Upload a file
67
+ Supported formats:
68
+
69
+ Video: .mp4, .webm, .avi, .mov, .mkv, .m4v
70
+
71
+ Audio: .mp3, .wav, .m4a, .aac, .ogg, .flac
72
+
73
+ 2. Provide a URL
74
+ Loom videos: https://www.loom.com/share/...
75
+
76
+ Direct media links: https://example.com/video.mp4
77
+
78
+ πŸ”§ Optimizations for Large Files
79
+ The system automatically handles large files using these techniques:
80
+
81
+ Diagram
82
+ Code
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ Chunk Processing:
99
+
100
+ Audio is split into 1-minute segments
101
+
102
+ Only segments >10 seconds are processed
103
+
104
+ Enables parallel processing (future implementation)
105
+
106
+ Early Stopping:
107
+
108
+ Stops processing when 3 consecutive chunks agree with high confidence
109
+
110
+ Saves processing time for long files
111
+
112
+ Efficient Extraction:
113
+
114
+ Uses FFmpeg for fast audio extraction
115
+
116
+ Torchaudio fallback for compatibility
117
+
118
+ Direct streaming for URL sources
119
+
120
+ Confidence Threshold:
121
+
122
+ Only predictions >60% confidence are considered
123
+
124
+ Reduces false positives from noisy segments
125
+
126
+ πŸ“Š Example Output
127
+ Example Dashboard
128
+
129
+ The dashboard shows:
130
+
131
+ Predicted accent with confidence percentage
132
+
133
+ Confidence scores per minute
134
+
135
+ Accent distribution charts
136
+
137
+ Processing time metrics