Package: ertk
ERTK: Emotion Recognition ToolKitThis is a Python library with utilities for processing emotional
speech datasets and training/testing models. There are also command-line
tools for common tasks.InstallationThis project requires Python 3.7+. It is advised to run the scripts in a
Python virtual environment. One can be created with the commandpython -m venv .venvThen you can use this virtual environment:. .venv/bin/activateInstall from PyPIYou can install ERTK fromPyPIusingpip install ertkInstall from repositoryAlternatively you can clone this repository and install using the latest
commit:pip install -r requirements.txt
pip install .Or, if you want to develop continuously:pip install -e .Optional dependenciesOptional dependencies can be install via:pip install -r requirements-dev.txtOr via PyPI:pip install ertk[all-preprocessors]Note that if installing from PyPI, fairseq is not updated on PyPI and so
must be installed from GitHub directly:pip install git+https://github.com/facebookresearch/fairseq.git@ae59bd6d04871f6174351ad46c90992e1dca7ac7Using CLI toolsUpon installation, you should be able to use common tools using the CLI
applicationsertk-cli,ertk-datasetandertk-util. Use the--helpoption on each one to see what commands are available.Running experimensertk-cliis currently used to run experiments. Theexp2subcommand
runs experiments from a config file:ertk-cli exp2 /path/to/experiment.yaml override1=val1 override2=val2Viewing and processing dataertk-datasethas subcommands for viewing and processing datasets. To
view info for a dataset, after running the dataset script:ertk-dataset info corpus.yamlTo view info for individual annotations,ertk-dataset annotation speaker.csvSeebelowfor use ofertk-dataset processfor
feature extraction.Utilitiesertk-utilhas miscellaneous utility functions. The most notable isparallel_jobs, which runs multiple experiments in parallel on CPUs or
GPUs. Experiments are loaded into a queue and given to the next
available worker on a free CPU thread or GPU. The main thread keeps
track of failed jobs and writes them to the failed file.ertk-util parallel_jobs jobs1.txt jobs2.txt --failed failed.txt --cpus $(nproc)Feature extractionERTK has several feature extractors and processors built in. There are
feature extractors for OpenSMILE, openXBOW, fairseq, huggingface,
speechbrain, Keras applications, Audioset models (VGGish and YAMNet),
spectrograms, kmeans clustering, resampling, phonemisation, and voice
activity detection (VAD) trimming. To list all installed preprocessors,
runertk-dataset process --list_processors.To run a processor, useertk-dataset process --features processor.
For example, to extract embeddings from the original Wav2vec model:ertk-dataset process \
    files.txt \
    output.nc \
    --features fairseq \
    model_type=wav2vec \
    checkpoint=/path/to/wav2vec_large.ptExperiment configsExperiments can be configured with a YAML config file, which specifies
the dataset(s) to load, any modifcations to annotations, the features
to load, the model type and configuration.DatasetsThere are processing scripts for many emotional speech datasets in thedatasetsdirectory. Seedatsets/README.mdfor
more information about the supported datasets and the required
processing.PapersPapers that we have published will have associated code in thepapersdirectory. Seepapers/README.mdfor more
information about scripts for individual publications.CitingIf you use ERTK, please cite our paper:@inproceedings{keesingAcousticFeaturesNeural2021,
    title = {Acoustic {{Features}} and {{Neural Representations}} for {{Categorical Emotion Recognition}} from {{Speech}}},
    booktitle = {Interspeech 2021},
    author = {Keesing, Aaron and Koh, Yun Sing and Witbrock, Michael},
    year = {2021},
    month = aug,
    pages = {3415--3419},
    publisher = {{ISCA}},
    doi = {10.21437/Interspeech.2021-2217},
}