Spaces:
Sleeping
Sleeping
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