ibllib.io.extractors.training_audio

Functions

extract_sound

Simple audio features extraction for ambient sound characterization.

welchogram

Computes a spectrogram on a very large audio file.

welchogram(fs, wav, nswin=262144, overlap=131072.0, nperseg=512)[source]

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

extract_sound(ses_path, save=True, force=False, delete=False)[source]

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