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 |
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 | |
t | time vector |
babblestr | path to either a pre-made babble-noise file or folder containing single-speaker recordings |
nint | number of talkers, i.e. number of files to include from the folder containing single-speaker recordings |
gapfloat | center position of the gap |
gapfloat | length of the gap |
noisefloat | onset of the babble noise |
noisefloat | length of the babble noise |
rampUnion[ | 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 |
rampRampFunction | ramp function for generating the ramps (see data_creation.ramp ) |
Returns | |
( | start index of the babble cut, babble without gap, babble with gap |