mexca.audio.extraction

Extract voice features from an audio file.

Module Contents

Classes

VoiceExtractor

Extract voice features from an audio file.

Functions

cli()

Command line interface for extracting voice features.

class mexca.audio.extraction.VoiceExtractor[source]

Extract voice features from an audio file.

Currently, only the voice pitch as the fundamental frequency F0 can be extracted. The F0 is calculated using an autocorrelation function with a lower boundary of 75 Hz and an upper boudnary of 600 Hz. See the praat manual for details.

apply(filepath: str, time_step: float, skip_frames: int = 1) mexca.data.VoiceFeatures[source]

Extract voice features from an audio file.

Parameters
  • filepath (str) – Path to the audio file.

  • time_step (float) – The interval between time points at which features are extracted.

  • skip_frames (int) – Only process every nth frame, starting at 0.

Returns

A data class object containing the extracted voice features.

Return type

VoiceFeatures

mexca.audio.extraction.cli()[source]

Command line interface for extracting voice features. See extract-voice -h for details.