uwacan.recordings.AudioFileRecording#

class AudioFileRecording(files, assume_sorted=False, **kwargs)[source]#

Bases: FileRecording

Class for audio file recordings.

This class handles reading audio files using the soundfile python package. This is a fully functional class, but reading data requires a start_time_parser function passed to the read_folder classmethod. A more convenient approach is to subclass this class and customize the read_folder classmethod.

Methods

read_folder(folder, start_time_parser[, ...])

Read all matching files in a folder and parse their start times.

rolling([duration, step, overlap])

Generate rolling frames of data.

time_data()

Read stored time data.

Inherited methods

check_file_continuity([start_time, ...])

Check the continuity of recorded data.

raw_data([start_time, stop_time])

Read raw data from files on disk.

raw_frames([start_time, stop_time, framesize])

Generate frames of raw data from files on disk.

select_file_name(name)

Get a recording for a specific file, by name.

select_file_time(time)

Get a recording for a specific file, by time.

subwindow([time, start, stop, center, ...])

Select a subset of the recording.

Attributes

adc_range

The voltage peak range of the adc in this recording.

allowable_interrupt

How long gap is allowed between files when reading.

file_range

The input range of the read files.

gain

The gain of this recording.

num_channels

The number of channel in the recording, and the read data.

samplerate

The samplerate of the recording, in Hz.

time_window

A TimeWindow that covers the recording.