Shujah239 commited on
Commit
8b17c8d
·
verified ·
1 Parent(s): 31c7755

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -61
README.md CHANGED
@@ -1,62 +1,73 @@
1
- # Audio Emotion Detection API
2
-
3
- This application provides an API for detecting emotions in audio files using the wav2vec2 model fine-tuned for emotion recognition.
4
-
5
- ## Features
6
-
7
- - Upload audio files for emotion analysis
8
- - List all uploaded recordings
9
- - Download previously uploaded recordings
10
- - Analyze existing recordings
11
- - Delete recordings
12
-
13
- ## API Endpoints
14
-
15
- - `GET /health` - Health check endpoint
16
- - `POST /upload` - Upload and analyze an audio file
17
- - `GET /recordings` - List all uploaded recordings
18
- - `GET /recordings/{filename}` - Download a specific recording
19
- - `GET /analyze/{filename}` - Analyze an existing recording
20
- - `DELETE /recordings/{filename}` - Delete a recording
21
-
22
- ## Supported Audio Formats
23
-
24
- - WAV
25
- - MP3
26
- - OGG
27
- - FLAC
28
-
29
- ## File Size Limits
30
-
31
- Maximum file size: 10MB
32
-
33
- ## Usage Example
34
-
35
- ```python
36
- import requests
37
-
38
- # Upload and analyze an audio file
39
- with open('your_audio.wav', 'rb') as f:
40
- files = {'file': f}
41
- response = requests.post('https://your-space-url.hf.space/upload', files=files)
42
- print(response.json())
43
- ```
44
-
45
- ## Technical Details
46
-
47
- - Based on FastAPI
48
- - Uses Hugging Face's wav2vec2-base-superb-er model for emotion recognition
49
- - Optimized for Hugging Face Spaces deployment
50
- - Automatic file cleanup to manage storage limits
51
-
52
- ## Storage Management
53
-
54
- Files are automatically cleaned up after 24 hours to manage storage limits on Hugging Face Spaces.
55
-
56
- ## Development
57
-
58
- To run this API locally:
59
-
60
- 1. Install dependencies: `pip install -r requirements.txt`
61
- 2. Run the server: `python app.py`
 
 
 
 
 
 
 
 
 
 
 
62
  3. Access the Swagger documentation at `http://localhost:7860/docs`
 
1
+ ---
2
+ title: Audio Emotion Detection API
3
+ emoji: 🎵
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ sdk_version: "latest"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ # Audio Emotion Detection API
13
+
14
+ This application provides an API for detecting emotions in audio files using the wav2vec2 model fine-tuned for emotion recognition.
15
+
16
+ ## Features
17
+
18
+ - Upload audio files for emotion analysis
19
+ - List all uploaded recordings
20
+ - Download previously uploaded recordings
21
+ - Analyze existing recordings
22
+ - Delete recordings
23
+
24
+ ## API Endpoints
25
+
26
+ - `GET /health` - Health check endpoint
27
+ - `POST /upload` - Upload and analyze an audio file
28
+ - `GET /recordings` - List all uploaded recordings
29
+ - `GET /recordings/{filename}` - Download a specific recording
30
+ - `GET /analyze/{filename}` - Analyze an existing recording
31
+ - `DELETE /recordings/{filename}` - Delete a recording
32
+
33
+ ## Supported Audio Formats
34
+
35
+ - WAV
36
+ - MP3
37
+ - OGG
38
+ - FLAC
39
+
40
+ ## File Size Limits
41
+
42
+ Maximum file size: 10MB
43
+
44
+ ## Usage Example
45
+
46
+ ```python
47
+ import requests
48
+
49
+ # Upload and analyze an audio file
50
+ with open('your_audio.wav', 'rb') as f:
51
+ files = {'file': f}
52
+ response = requests.post('https://your-space-url.hf.space/upload', files=files)
53
+ print(response.json())
54
+ ```
55
+
56
+ ## Technical Details
57
+
58
+ - Based on FastAPI
59
+ - Uses Hugging Face's wav2vec2-base-superb-er model for emotion recognition
60
+ - Optimized for Hugging Face Spaces deployment
61
+ - Automatic file cleanup to manage storage limits
62
+
63
+ ## Storage Management
64
+
65
+ Files are automatically cleaned up after 24 hours to manage storage limits on Hugging Face Spaces.
66
+
67
+ ## Development
68
+
69
+ To run this API locally:
70
+
71
+ 1. Install dependencies: `pip install -r requirements.txt`
72
+ 2. Run the server: `python app.py`
73
  3. Access the Swagger documentation at `http://localhost:7860/docs`