Pheire commited on
Commit
c60174c
Β·
verified Β·
1 Parent(s): 0467024

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -0
README.md CHANGED
@@ -1,3 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Accent Detector
3
  emoji: 🏒
 
1
+
2
+ # πŸ—£οΈ Accent Identifier
3
+
4
+ This tool identifies the **speaker's accent** from a video or audio input. It supports uploads and URLs β€” including **direct `.mp4` links**, **Loom videos**, and **YouTube-style links** β€” and uses a deep learning model from [SpeechBrain](https://speechbrain.readthedocs.io/en/latest/index.html) for inference.
5
+
6
+ ## πŸš€ Demo
7
+
8
+ Try it out live on [Hugging Face Spaces](https://pheire-accent-detector.hf.space) *(replace with your actual link)*.
9
+
10
+ ---
11
+
12
+ ## πŸ“¦ Features
13
+
14
+ * πŸŽ₯ Accepts video/audio uploads (`.mp4`, `.wav`, `.mp3`)
15
+ * 🌐 Handles direct URLs (e.g. Loom, direct `.mp4`, YouTube)
16
+ * 🧠 Classifies accent using `speechbrain` pretrained model
17
+ * πŸ“Š Returns top prediction and top-3 probabilities
18
+ * ⚑ Fast and easy UI built with [Gradio](https://gradio.app)
19
+
20
+ ---
21
+
22
+ ## πŸ§ͺ Example Inputs
23
+
24
+ * `https://www.loom.com/share/abc123`
25
+ * `https://yourdomain.com/sample.mp4`
26
+ * Uploaded audio: `voice_sample.wav`
27
+
28
+ ---
29
+
30
+ ## πŸ› οΈ Installation
31
+
32
+ ```bash
33
+ git clone https://github.com/yourusername/accent-identifier.git
34
+ cd accent-identifier
35
+
36
+ # Create virtual environment (optional but recommended)
37
+ python -m venv venv
38
+ source venv/bin/activate # On Windows use `venv\Scripts\activate`
39
+
40
+ # Install dependencies
41
+ pip install -r requirements.txt
42
+ ```
43
+
44
+ ### requirements.txt
45
+
46
+ ```
47
+ speechbrain
48
+ gradio
49
+ torchaudio
50
+ torch
51
+ ffmpeg-python
52
+ yt-dlp
53
+ requests
54
+ ```
55
+
56
+ Make sure `ffmpeg` is installed and available in your system path.
57
+ You can test with: `ffmpeg -version`
58
+
59
+ ---
60
+
61
+ ## ▢️ Run Locally
62
+
63
+ ```bash
64
+ python app.py
65
+ ```
66
+
67
+ This will launch a Gradio interface in your browser at `http://localhost:7860`.
68
+
69
+ ---
70
+
71
+ ## 🧠 Model Details
72
+
73
+ * **Model**: `Jzuluaga/accent-id-commonaccent_ecapa`
74
+ * **Framework**: [SpeechBrain](https://speechbrain.readthedocs.io/)
75
+ * **Classes**: US, UK, Australia, Canada, India, etc.
76
+
77
+ ---
78
+
79
+ ## πŸ“‚ Project Structure
80
+
81
+ ```
82
+ accent-identifier/
83
+ β”œβ”€β”€ app.py # Main Gradio app
84
+ β”œβ”€β”€ requirements.txt # Dependencies
85
+ └── README.md # You are here
86
+ ```
87
+
88
+ ---
89
+
90
+ ## 🧩 Notes
91
+
92
+ * Loom support relies on their internal API. It may break if they change the endpoint.
93
+ * Audio is extracted to `.wav` using `ffmpeg` with 16kHz mono format for model compatibility.
94
+
95
+
96
+
97
+
98
  ---
99
  title: Accent Detector
100
  emoji: 🏒