i6_core.features.common

i6_core.features.common.add_derivatives(feature_net, derivatives=1)
i6_core.features.common.add_linear_transform(feature_net, matrix_path)
i6_core.features.common.basic_cache_flow(cache_files)
i6_core.features.common.cepstrum_flow(normalize=True, outputs=16, add_epsilon=False, epsilon=1.175494e-38)
i6_core.features.common.external_file_feature_flow(flow_file)
i6_core.features.common.feature_extraction_cache_flow(feature_net, port_name_mapping, one_dimensional_outputs=None)
Parameters:
  • feature_net (rasr.FlowNetwork) – feature flow to extract features from

  • port_name_mapping (dict[str,str]) – maps output ports to names of the cache files

  • one_dimensional_outputs (set[str]|None) – output ports that return one-dimensional features (e.g. energy)

Return type:

rasr.FlowNetwork

i6_core.features.common.fft_flow(preemphasis=1.0, window_type='hamming', window_shift=0.01, window_length=0.025)
i6_core.features.common.make_first_feature_energy(feature_net)
i6_core.features.common.normalize_features(feature_net, length='infinite', right='infinite', norm_type='mean-and-variance')

Add normalization of the specfified type to the feature flow :param feature_net rasr.FlowNetwork: the unnormalized flow network, must have an output named ‘features’ :param length int|str: length of the normalization window in frames (or ‘infinite’) :param right int|str: number of frames right of the current position in the normalization window (can also be ‘infinite’) :param norm_type str: type of normalization, possible values are ‘level’, ‘mean’, ‘mean-and-variance’, ‘mean-and-variance-1D’, ‘divide-by-mean’, ‘mean-norm’ :returns rasr.FlowNetwork: input FlowNetwork with a signal-normalization node before the output

i6_core.features.common.raw_audio_flow(audio_format='wav')
i6_core.features.common.samples_flow(audio_format='wav', dc_detection=True, dc_params={'max-dc-increment': 0.9, 'min-dc-length': 0.01, 'min-non-dc-segment-length': 0.021}, input_options=None, scale_input=None)

Create a flow to read samples from audio files, convert it to f32 and apply optional dc-detection.

Files that do not have a native input node will be opened with the ffmpeg flow node. Please check if scaling is needed.

Native input formats are:
  • wav

  • nist

  • flac

  • mpeg (mp3)

  • gsm

  • htk

  • phondat

  • oss

For more information see: https://www-i6.informatik.rwth-aachen.de/rwth-asr/manual/index.php/Audio_Nodes

Parameters:
  • audio_format (str) – the input audio format

  • dc_detection (bool) – enable dc-detection node

  • dc_params (dict) – optional dc-detection node parameters

  • input_options (dict) – additional options for the input node

  • scale_input (int|float|None) – scale the waveform samples, this might be needed to scale ogg inputs by 2**15 to support feature flows designed for 16-bit wav inputs

Returns:

i6_core.features.common.select_features(feature_net, select_range)
i6_core.features.common.sync_energy_features(feature_net, energy_net)
i6_core.features.common.sync_features(feature_net, target_net, feature_output='features', target_output='features')