feed_forward

Copyright 2014-2020 Anthony Larcher

The authors would like to thank the BUT Speech@FIT group (http://speech.fit.vutbr.cz) and Lukas BURGET for sharing the source code that strongly inspired this module. Thank you for your valuable contribution.

nnet.feed_forward.kaldi_to_hdf5(input_file_name, output_file_name)[source]

Convert a text file containing frame alignment from Kaldi into an HDF5 file with the following structure:

show/start/labels

Parameters
  • input_file_name

  • output_file_name

Returns

nnet.feed_forward.mean_std_many(features_server, feature_size, seg_list, traps=False, num_thread=1)[source]

Compute the mean and standard deviation from a list of segments.

Parameters
  • features_server – FeaturesServer used to load data

  • feature_size – dimension o the features to accumulate

  • seg_list – list of file names with start and stop indices

  • traps – apply traps processing on the features in context

  • traps – apply traps processing on the features in context

  • num_thread – number of parallel processing to run

Returns

a tuple of three values, the number of frames, the mean and the standard deviation

nnet.feed_forward.segment_mean_std_hdf5(input_segment)[source]

Compute the sum and square sum of all features for a list of segments. Input files are in HDF5 format

Parameters

input_segment – list of segments to read from, each element of the list is a tuple of 5 values, the filename, the index of thefirst frame, index of the last frame, the number of frames for the left context and the number of frames for the right context

Returns

a tuple of three values, the number of frames, the sum of frames and the sum of squares