SER-Standardizer
🇺🇸 English | 🇧🇷 Português
A modular infrastructure for dataset standardization and feature extraction in Speech Emotion Recognition (SER).
SER-Standardizer is a Python package built to unify the formatting of multiple speech databases, mitigating metadata heterogeneity. Its main goal is to facilitate cross-corpus training and generalization testing of machine learning models.
Beyond the standardization pipeline, the tool provides an extension module for acoustic feature extraction (spectral and prosodic) by integrating the openSMILE framework.
📋 Currently Supported Datasets
The tool currently supports loading and standardizing the following databases:
- CREMA-D | IEMOCAP | EmoUERJ (PT-BR) | MSP-IMPROV | MSP-PODCAST | RAVDESS | EmoDB (DE)
Per-dataset download and directory-layout guides are available under docs/en/.
🚀 Installation
Prerequisites
- Python 3.8 or higher
- Libraries listed in
pyproject.toml(installed automatically).
The library is published on PyPI and was designed with flexibility in mind, offering two installation modes to optimize the use of computational resources:
1. Base Installation (Lightweight Metadata)
Installs only the essential packages (pandas, audb) for tabular standardization and filtering.
pip install ser-standardizer
2. Full Installation (With Signal Processing)
Installs the heavy dependencies required for the feature extraction and audio manipulation module (opensmile, noisereduce).
pip install "ser-standardizer[features]"
Installation from source
Only needed to modify the code or track the development version:
git clone https://github.com/ViniciusSuaiden/ser-standardizer.git
cd ser-standardizer
pip install ".[features]"
💻 How to Use
The workflow is split into three logical steps:
1. Preprocessing (CLI)
After installation, the ser-std command becomes available in your terminal.
To standardize a specific dataset:
# Example: crema_d
ser-std --dataset crema_d --input_dir /path/to/crema
The standardized .csv file is written to the user's home folder, with a specific name for each database.
MSP-IMPROV users:
speaker_idandgenderare now taken from the actor field of the filename, and speaker IDs changed format (msp_F01instead ofmsp_F01_M). Regenerate any MSP-IMPROV CSV cached in~/.ser_standardizer_data/by an earlier version; seeCHANGELOG.md.
The same standardization is available from Python, for use inside analysis code:
import ser_standardizer as ser
ser.preprocess("crema_d", "/path/to/crema") # caches the CSV, like the CLI
ser.preprocess("emouerj") # no path: audb handles the download
2. Data Handling and Filtering (Python)
After preprocessing, use the library to load, filter and manipulate the audio directly in your code or Jupyter Notebook.
import ser_standardizer as ser
# Loads multiple standardized datasets into a single DataFrame
df = ser.load_datasets(["crema_d", "ravdess", "iemocap"])
# Filters by dataset, emotion and gender
df_target = ser.filters(
df,
datasets=['ravdess', 'iemocap'],
emotions=['angry', 'sad'],
genders=['female']
)
3. Acoustic Feature Extraction (Requires [features])
The extraction module automates digital signal processing. It includes the option to apply a Voice Activity Detection (VAD) mask based on RMS energy to extract features strictly from the effective phonation segments.
# Batch extraction via openSMILE
# Supported 'feature_set' values: 'eGeMAPS' or 'ComParE'
features_df = ser.extract_features(
df_target,
feature_set='eGeMAPS',
feature_level='functionals', # 'functionals' (1 vector per utterance) or 'llds' (per frame)
use_vad=False, # VAD (silence removal) is only allowed with feature_level='llds'
sr=16000 # Sampling rate
)
# The result preserves the original indices, making concatenation easy
import pandas as pd
final_dataset = pd.concat([df_target, features_df], axis=1)
# Group-wise normalization (z-score) — removes corpus/speaker offsets.
# Pass the grouping column (e.g., 'dataset' or 'speaker_id').
X_corpus = ser.normalize(features_df, df_target['dataset'])
X_speaker = ser.normalize(features_df, df_target['speaker_id'])
# Train/test protocols: estimate the statistics on the training rows only.
# Groups without training rows (e.g., the held-out corpus) use their own
# statistics, without labels; pass unseen='error' to forbid that.
X_norm = ser.normalize(features_df, df_target['dataset'], fit_mask=is_train)
# return_stats=True also returns the per-group mean and std, to apply the
# same statistics to new data (e.g., at inference time).
X_norm, mean, std = ser.normalize(features_df, df_target['dataset'], return_stats=True)
# --- Extra Utilities ---
# Listen to the audio in a Jupyter Notebook
ser.listen(df_target, index=42)
# Load the raw audio as a NumPy array (e.g., to feed neural networks)
audio_array = ser.load_audio(df_target, index=42)
# Load a batch of audio with zero-padding
batch = ser.load_batch(df_target, begin=0, end=32)
🧪 Tests
The test suite (tests/) covers the public API (filters, normalize, preprocess, load_datasets), the VAD (remove_silence) on synthetic signals, the argument guards of extract_features, and every loader against small synthetic directory trees that reproduce each corpus' real layout and naming conventions (EmoUERJ uses a mocked audb). It runs on Ubuntu, Windows and macOS through GitHub Actions; branch coverage is currently 95%.
pip install ".[features,test]"
pytest
Each parser was also checked against the full corpora with scripts/verify_parsers.py; the counts next to the official figures are in docs/parser_verification.md.
✍️ Authors
Vinicius Suaiden - USP - vinicius.suaiden@usp.br
Miguel Arjona Ramirez - USP - maramire@usp.br
Wesley Beccaro - USP - wesleybeccaro@usp.br
Metadata
Release files for ser-standardizer 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ser_standardizer-0.4.0.tar.gz | 37.5 kB | Without provenance | Details for ser_standardizer-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ser_standardizer-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ser_standardizer-0.4.0-py3-none-any.whl |
Total release size: 63.7 kB
Release files / ser_standardizer-0.4.0.tar.gz
| Download URL | ser_standardizer-0.4.0.tar.gz |
|---|---|
| Size | 37.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62d2ef253815ba9f0cfb86e0751fa63b4a529d50eefba46d2418a1da1720d3a7
|
|
BLAKE2b-256 checksum How to use checksums |
85b6a1e4b58bb2ce98900b357f1ebaa276b51b93017ab6a643759de6f87a7a7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / ser_standardizer-0.4.0-py3-none-any.whl
| Download URL | ser_standardizer-0.4.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f562efd1986563e88607a011a5c1a0a8cf24762f96b7023a0be24e7c0254a47
|
|
BLAKE2b-256 checksum How to use checksums |
e840eb227356876ee2cbf9ebd71add1680497c13b20fb9527fe8d249d1d442f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for ser-standardizer 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.