AcousticCorpusMixin#

class montreal_forced_aligner.corpus.acoustic_corpus.AcousticCorpusMixin(audio_directory=None, **kwargs)[source]#

Bases: CorpusMixin, FeatureConfigMixin

Mixin class for acoustic corpora

Parameters:

audio_directory (str) – Extra directory to look for audio files

See also

CorpusMixin

For corpus parsing parameters

FeatureConfigMixin

For feature generation parameters

Variables:
  • sound_file_errors (list[str]) – List of sound files with errors in loading

  • stopped (Event) – Stop check for loading the corpus

calc_cmvn()[source]#

Calculate CMVN statistics for speakers

See also

featbin/compute-cmvn-stats.cc

Relevant Kaldi binary

calc_fmllr(iteration=None)[source]#

Multiprocessing function that computes speaker adaptation transforms via feature-space Maximum Likelihood Linear Regression (fMLLR).

See also

CalcFmllrFunction

Multiprocessing helper function for each job

AcousticCorpusMixin.calc_fmllr_arguments

Job method for generating arguments for the helper function

align_fmllr.sh

Reference Kaldi script

train_sat.sh

Reference Kaldi script

calc_fmllr_arguments(iteration=None)[source]#

Generate Job arguments for CalcFmllrFunction

Returns:

Arguments for processing

Return type:

list[CalcFmllrArguments]

combine_feats()[source]#

Combine feature generation results and store relevant information

compute_vad()[source]#

Compute Voice Activity Detection features over the corpus

See also

ComputeVadFunction

Multiprocessing helper function for each job

AcousticCorpusMixin.compute_vad_arguments

Job method for generating arguments for helper function

compute_vad_arguments()[source]#

Generate Job arguments for ComputeVadFunction

Returns:

Arguments for processing

Return type:

list[VadArguments]

create_corpus_split()[source]#

Create the split directory for the corpus

final_feature_arguments()[source]#

Generate Job arguments for MfccFunction

Returns:

Arguments for processing

Return type:

list[MfccArguments]

generate_features()[source]#

Generate features for the corpus

generate_final_features()[source]#

Generate features for the corpus

get_feat_dim()[source]#

Calculate the feature dimension for the corpus

Returns:

Dimension of feature vectors

Return type:

int

inspect_database()[source]#

Check if a database file exists and create the necessary metadata

load_corpus()[source]#

Load the corpus

load_reference_alignments(reference_directory)[source]#

Load reference alignments to use in alignment evaluation from a directory

Parameters:

reference_directory (Path) – Directory containing reference alignments

mfcc()[source]#

Multiprocessing function that converts sound files into MFCCs.

See Kaldi feat page for an overview on feature generation in Kaldi.

See also

MfccFunction

Multiprocessing helper function for each job

AcousticCorpusMixin.mfcc_arguments

Job method for generating arguments for helper function

make_mfcc.sh

Reference Kaldi script

mfcc_arguments()[source]#

Generate Job arguments for MfccFunction

Returns:

Arguments for processing

Return type:

list[MfccArguments]

property no_transcription_files#

List of sound files without text files

property transcriptions_without_wavs#

List of text files without sound files

validate_corpus()[source]#

Validate the loaded files