Skip to main content

Speech Emotion Recognition models and training using PyTorch

Project description

Vistec-AIS Speech Emotion Recognition

python-badge pytorch-badge license

Code Grade Code Quality Score

Speech Emotion Recognition Model and Inferencing using Pytorch

Installation

From Pypi

pip install vistec-ser

From source

git clone https://github.com/tann9949/vistec-ser.git
cd vistec-ser
python setup.py install

Usage

Training with AIS-SER-TH Dataset

We provide Google Colaboratory example for training the AIS-SER-TH dataset using our repository.

colab

Training using provided scripts

Note that currently, this workflow only supports pre-loaded features. So it might comsume an additional overhead of ~2 Gb or RAM. To run the experiment. Run the following command

Since there are 80 studios recording and 20 zoom recording. We split the dataset into 10-fold, 10 studios each. Then evaluate using k-fold cross validation method. We provide 2 k-fold experiments: including and excluding zoom recording. This can be configured in config file (see examples/aisser.yaml)

python examples/train_fold_aisser.py --config-path <path-to-config> --n-iter <number-of-iterations>  

Inferencing

We also implement a FastAPI backend server as an example of deploying a SER model. To run the server, run

cd examples
uvicorn server:app --reload

You can customize the server by modifying example/thaiser.yaml in inference field.

Once the server spawn, you can do HTTP POST request in form-data format. and JSON will return as the following format:

[
  {
    "name": <request-file-name>,
    "prob": {
      "neutral": <p(neu)>,
      "anger": <p(ang)>,
      "happiness": <p(hap)>,
      "sadness": <p(sad)>
    }
  }, ...
]

See an example below:

server-demo

Author & Sponsor

airesearch ais

Chompakorn Chaksangchaichot

Email: chompakornc_pro@vistec.ac.th

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vistec-ser-0.4.0a4.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vistec_ser-0.4.0a4-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file vistec-ser-0.4.0a4.tar.gz.

File metadata

  • Download URL: vistec-ser-0.4.0a4.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for vistec-ser-0.4.0a4.tar.gz
Algorithm Hash digest
SHA256 15d9a6ca33b317ceb57158a1568d8585b001bec8c22dac5962960aeef85e628a
MD5 1d3f6c7b13353a3eeb8c45dac344188d
BLAKE2b-256 e7b32e55aab9b3486395e16efa7745d0e4b1bd8e15cfac4f1ac2c84d9e1ae037

See more details on using hashes here.

File details

Details for the file vistec_ser-0.4.0a4-py3-none-any.whl.

File metadata

  • Download URL: vistec_ser-0.4.0a4-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for vistec_ser-0.4.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 67c2c4ababaab9740c956e0ca4dd9f23f7bbaead79656246e549d39783bbbfae
MD5 72c461ff11c78f30aeaa580d218615ac
BLAKE2b-256 94de0acd8d64e62032384310f88ae123fe2e02e7bd74c6772f256ad651177401

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page