File size: 2,765 Bytes
609aba1
 
 
d074961
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
sdk: streamlit
---


# English Accent Detection Tool

## Project Overview

This tool is a working proof-of-concept designed to evaluate spoken English in candidate video submissions. It automatically extracts audio from a public video or uploaded file, identifies whether the language spoken is English, and classifies the English accent (e.g., American, British, Australian). A confidence score is also provided to aid in candidate screening.

This submission was developed as part of the REM Waste hiring challenge, with emphasis on practicality, technical clarity, and clean design.

---

## Features

* Accepts public video URLs (e.g., Loom, MP4 links) or uploaded video/audio files.
* Extracts audio using `ffmpeg`.
* Detects the spoken language using `SpeechBrain`'s language identification model.
* If English is detected, simulates classification into common English accents.
* Outputs include:

  * Accent classification
  * Confidence score (0–100%)
  * Brief summary

---

## Live Demo

Deployed Streamlit app (hosted on Streamlit Cloud):

**\[Live App URL – Insert Link Here]**

---

## Technology Stack

* **Python 3**
* **Streamlit** for the web interface
* **SpeechBrain** for spoken language identification
* **Torchaudio** for audio preprocessing
* **FFMPEG** for audio extraction
* **Requests, Matplotlib** for I/O and optional output handling

---

## How It Works

1. The user inputs a video URL or uploads a file.
2. The audio is extracted and resampled to a suitable format.
3. The system determines whether the speaker is using English.
4. If English is detected, the tool classifies the accent based on common linguistic traits.
5. The result includes:

   * Accent label (e.g., British)
   * Confidence score
   * Explanation or notes

---

## Local Setup Instructions

1. Clone the repository:

   ```bash
   git clone https://github.com/yourusername/english-accent-detector.git
   cd english-accent-detector
   ```

2. Install dependencies:

   ```bash
   pip install -r requirements.txt
   ```

3. Launch the app:

   ```bash
   streamlit run app.py
   ```

---

## Requirements

```
streamlit
torch
torchaudio
speechbrain
ffmpeg-python
requests
matplotlib
```

---

## Notes

* Accent classification is simulated based on common accent features, due to the lack of an open-source, fine-grained English accent classifier.
* The core English language detection is handled by a pre-trained SpeechBrain model.
* This project was developed as a rapid prototype within the recommended 4–6 hour window and can be expanded into a production-grade system with access to more detailed accent datasets and APIs.

---

## Author

Developed by Edgar Muyale 
For inquiries: edgarmuyale@gmail.com
Submission for REM Waste Hiring Challenge