Table of Contents
ACTemo's ACTion
feature enables users to choose the emotional category they wish to practice and receive real-time feedback on the accuracy of their expression in the audio input. The feedback, provided in grades like 'A', 'B', and 'C', evaluates the expression's precision, ensuring users can refine their emotional portrayal skills instantly.
ACTemo provides a self-hosted version with Dockerfile
. This allows you to deploy your own speech-emotion-evaluation model in just a few minutes, even without prior expertise.
We provide a Dockerfile for deploying the ACTemo's ACTion function on your own private device. Use the following command to start:
# 1. Build docker image
$ docker build -f SER_model/Dockerfile.prod -t actemo:prod .
# 2. Run!
$ docker run -it --rm --name actemo-prod -p 8000:8000 actemo:prod
To make a request to the API server, use the following endpoint:
- Method: POST
- Host: http://localhost:8000
- URL: /predict
In the request body, include the following keys and values:
- Attach your file to the
"file"
key. - Specify one of the following emotions as the value for the
"emotion"
key:
'Angry', 'Distressed', 'Content', 'Happy', 'Excited', 'Joyous', 'Depressed', 'Sad', 'Bored', 'Calm', 'Relaxed', 'Sleepy', 'Afraid', 'Surprised'
Tip
We support all audio formats compatible with ffmpeg, such as m4a
, mp3
, caf
, and more.
The response is returned in JSON format, with each audio assigned a grade, such as 'A', 'B', and 'C'.
If you simply want to train or test the model without deploying the API server, follow these steps:
# 1. Build docker image
$ docker build -f SER_model/Dockerfile.dev -t actemo:dev .
# 2. Run!
$ docker run -it --rm --name actemo-dev -p 8000:8000 -v $(pwd)/SER_model:/root/code actemo:dev /bin/bash
Note
After running the Docker container using the provided command, you'll have access to the bash
shell within the container environment.
Inside the Docker container's bash shell, execute the following command to run the test:
$ python test.py
You will be prompted with the following messages:
-
"Enter the emotion: "
: Input one of the listed emotions.'Angry', 'Distressed', 'Content', 'Happy', 'Excited', 'Joyous', 'Depressed', 'Sad', 'Bored', 'Calm', 'Relaxed', 'Sleepy', 'Afraid', 'Surprised'
-
"Enter the path of the audio file: "
: Input the path of the audio file containing the practiced emotional expression.
Tip
This process will continue indefinitely. If you wish to stop, simply press Ctrl + C
.
If you want to explore other parts of the project, feel free to navigate to:
- Overall Project Repository: For the complete project repository, including all parts, visit the GitHub repository.
- Frontend Development: Explore the frontend development aspects of the project, including UI design and user interaction, implemented using Flutter.
- Backend Development: Dive into the backend development aspects of the project, including API implementation and database management.