SER_wav2vec / README.md
marshal-yash's picture
Update README.md
61f8b55 verified
metadata
title: SER Wav2Vec
sdk: docker
app_port: 7860

🎀 Speech Emotion Recognition β€” Wav2Vec2 (FastAPI + Docker)

This Hugging Face Space provides a backend API for Speech Emotion Recognition (SER)
using the Wav2Vec2ForSequenceClassification model.

The backend is implemented using FastAPI and runs inside a Docker container
that exposes the /predict endpoint to accept audio and return emotion scores.


πŸš€ API Endpoints

1. Health Check

##/GET

Example Response:

{ "status": "ok" }

Emotion Prediction
POST /predict
| field | type   | description                     |
| ----- | ------ | ------------------------------- |
| file  | binary | audio file (.wav / .mp3 / .m4a) |


curl -X POST "https://marshal-yash-SER_wav2vec.hf.space/predict" \
  -H "accept: application/json" \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected]"


{
  "results": [
    { "label": "happy", "score": 0.71 },
    { "label": "neutral", "score": 0.15 },
    { "label": "sad", "score": 0.08 }
  ],
  "dominant": { "label": "happy", "score": 0.71 }
}


β”œβ”€β”€ server.py          # FastAPI application
β”œβ”€β”€ Dockerfile         # Docker config for HF Spaces
β”œβ”€β”€ requirements.txt   # Python dependencies
└── README.md          # Documentation (this file)


marshal-yash/SER_wav2vec