module documentation

Gap detection experiment ment for training machines!

This particular experiment setup mimics the code convention for the other experiments, but is intended for creating the training gap-in-babble training data.

It's slightly different from the other generators, as it returns both a gap and no-gap condition. This is needed in training for forcing the model to learn features of the gap, rather than random occuring cues from the generation process

Function generate_stimulus No summary
def generate_stimulus(t, babble_path, n_talkers, gap_position, gap_duration, noise_start=0.1, noise_duration=0.5, ramp_width=0.0025, ramp_function=hann_ramp_func): (source)
Parameters
ttime vector
babble_path:strpath to either a pre-made babble-noise file or folder containing single-speaker recordings
n_talkers:intnumber of talkers, i.e. number of files to include from the folder containing single-speaker recordings
gap_position:floatcenter position of the gap
gap_duration:floatlength of the gap
noise_start:floatonset of the babble noise
noise_duration:floatlength of the babble noise
ramp_width:Union[float, Annotated[List[float], MaxLen(2)]]width of both onset/offset and gap ramps if type=float, if type=List[float], first and second index are used for onset/offset and gap ramps respectively
ramp_function:RampFunctionramp function for generating the ramps (see data_creation.ramp)
Returns
(int, np.ndarray, np.ndarray)start index of the babble cut, babble without gap, babble with gap