Requires at least 1.5 gb memory to run fine
This FastAPI application provides an endpoint for performing emotion recognition on audio files.
-
Create a virtual environment and activate it:
python -m venv env # Windows .\env\Scripts\activate # Linux/Mac source env/bin/activate
-
Install dependencies:
pip install -r requirements.txt
To start the FastAPI server, run the following command:
uvicorn app:app --reload
This will start the server, and you can access the API at http://localhost:8000/docs.
You can perform emotion recognition on audio files by sending a POST request to /emotion_recognition. Upload an audio file with the request, and the API will return the detected emotion and its confidence score.
Example:
curl -X POST -F "audio_file=@/path/to/audio/file.wav" http://localhost:8000/emotion_recognition