Skip to main content

SER-Standardizer

🇺🇸 English | 🇧🇷 Português

PyPI License: MIT Python Version

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.

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'])

# --- 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)

✍️ 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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ser-standardizer 0.2.0
File Size Uploaded
ser_standardizer-0.2.0.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ser-standardizer 0.2.0
File Interpreter ABI Platform
ser_standardizer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.3 kB

Release files / ser_standardizer-0.2.0.tar.gz

Download URL ser_standardizer-0.2.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
993746fc4a0e3d47b973e1075e0dca804af24f8a786ecba1e7d089782a265e24
BLAKE2b-256 checksum
How to use checksums
bed5006eb40fc909652eadf62a3061ef9b4bd60a05642a5e65e58a61847bd6aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / ser_standardizer-0.2.0-py3-none-any.whl

Download URL ser_standardizer-0.2.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3c21f7d92360bd52261ab6bc632d8bd75d37b469f42f4492c9372d1be39f7b8
BLAKE2b-256 checksum
How to use checksums
fa052b4a29b6c5b056b09a87a43996573c257f9bc3312add8941169a8e2f599f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page