MFCC Extractor — User Guide

Calculates Mel-Frequency Cepstral Coefficients (MFCCs) for a selected sound and outputs the results to a Praat Table object for easy data export.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script performs a feature extraction process on a selected Sound object to calculate Mel-Frequency Cepstral Coefficients (MFCCs). MFCCs are a standard set of features used in automatic speech and music recognition, providing a compact representation of the short-term power spectrum based on a linear cosine transform of a log power spectrum on a nonlinear Mel scale of frequency.

Output Data: The script creates a new Praat Table object in the Objects window named "MFCC_Table" containing the time-stamped coefficients. By default, it calculates 12 coefficients (C1 to C12) for each time frame. This table can be easily saved as a text file (e.g., CSV) for further statistical analysis outside of Praat.

The calculation uses Praat's internal MFCC function with fixed, optimized parameters for standard voice and acoustic analysis.

Quick start

  1. Load a Sound object (preferably speech or a music sample) into the Praat Objects window.
  2. Select the Sound object.
  3. Run the script: PraatRun script…MFCC.praat.
  4. The script will create a new object named "MFCC_Table" in the Objects window.
  5. Select "MFCC_Table" and click View & Edit to see the data, or WriteWrite to file... to export the data.
Output: The script creates a new Table object. It removes temporary objects (MFCC and Matrix objects) but leaves the original Sound object untouched.
Important: This script requires a selected Sound object. If the sound is very long, the resulting Table will be large, potentially consuming significant memory. The script does not calculate the zeroth coefficient (C0).

Implementation Details

Analysis Steps

The script uses a standardized pipeline to generate the MFCC table:

Fixed Analysis Parameters

The MFCC calculation relies on the following fixed parameters, ensuring a consistent feature set:

ParameterValueDescription
Number of Coefficients12 (C1 to C12)The dimensionality of the cepstral vector, excluding C0.
Window Length0.015 s (15 ms)The size of the analysis window.
Time Step0.005 s (5 ms)The shift between analysis windows.
Max Frequency100 MelThe upper limit of the Mel-scale frequency band.
Number of Mel Filters100The number of triangular filters in the Mel filter bank.
Pre-emphasis0.0No pre-emphasis is applied.
Output FormatPraat Table objectThe final destination for the extracted features.