--- 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: ```json { "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 "file=@sample.wav" { "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