This function reads a sound classification file with column mic.wav_location_0 (potentially pointing to a different study path than the trial_results) and joins it. It then parses the sound_cat column and parses the classification to add the following one-hot-encoded columns: any_voice, undiff_voice, laughter, shriek, talk_to_threat, exclamation, talk_to_self.

join_sound_classification(df, sound_fn)

Arguments

df

A trial results tibble

sound_fn

A sound classification file (alternatively: a preprocessed data frame)

Value

The trial results tibble with added columns

Details

Sound classification file must have the following columns: mic.wav_location_0 and sound_cat. Further columns are added if they contain the strings transcription, comment or sound The expected classification key for sound_cat is: 0. No sound

  1. Non-differentiable (vowels, growls, long hissing)

  2. Laughing

  3. Shrieking

  4. Speech apparently directed at the threat

  5. Exclamation of surprise, including expletives

  6. Talking to oneself

  7. Talking to the experimenter

  8. Breathing sounds (to be used as filter: only classified when none of category 1-7 applies)

  9. Ambient sounds (to be used as filter: only classified when none of category 1-7 applies)