ibllib.io.extractors.training_audio

ibllib.io.extractors.training_audio.extract_sound(ses_path, save=True, force=False, delete=False)

Simple audio features extraction for ambient sound characterization. From a wav file, generates several ALF files to be registered on Alyx

Parameters:
  • ses_path – ALF full session path: (/mysubject001/YYYY-MM-DD/001)
  • delete – if True, removes the wav file after processing
Returns:

list of output files

ibllib.io.extractors.training_audio.welchogram(fs, wav, nswin=262144, overlap=131072.0, nperseg=512)

Computes a spectrogram on a very large audio file.

Parameters:
  • fs – sampling frequency (Hz)
  • wav – wav signal (vector or memmap)
  • nswin – n samples of the sliding window
  • overlap – n samples of the overlap between windows
  • nperseg – n samples for the computation of the spectrogram
Returns:

tscale, fscale, downsampled_spectrogram