dcase_util.processors.AudioReadingProcessor

class dcase_util.processors.AudioReadingProcessor(data=None, fs=44100, focus_start_samples=None, focus_stop_samples=None, focus_channel=None, mono=False, **kwargs)[source]

Constructor

Parameters
dataDataContainer

Data to initialize the container

fsint

Target sampling rate when reading audio

focus_start_samplesint

Sample id of the focus segment start

focus_stop_samplesint

Sample id of the focus segment stop

focus_channelint or str

Focus segment channel

monobool

Mixdown multi-channel audio in during the reading stage.

__init__(data=None, fs=44100, focus_start_samples=None, focus_stop_samples=None, focus_channel=None, mono=False, **kwargs)[source]

Constructor

Parameters
dataDataContainer

Data to initialize the container

fsint

Target sampling rate when reading audio

focus_start_samplesint

Sample id of the focus segment start

focus_stop_samplesint

Sample id of the focus segment stop

focus_channelint or str

Focus segment channel

monobool

Mixdown multi-channel audio in during the reading stage.

Methods

__init__([data, fs, focus_start_samples, ...])

Constructor

delimiter([exclude_delimiters])

Use csv.sniffer to guess delimiter for CSV file

detect_file_format([filename])

Detect file format from extension

empty()

Check if file is empty

exists()

Checks that file exists

get_file_information()

Get file information, filename

get_processing_chain_item()

Get processing chain item with current Processor data.

is_package([filename])

Determine if the file is compressed package.

load([filename])

Load file

log([level])

Log container content

process([data, filename, ...])

Audio reading

save([filename])

Save file

show([mode, indent, visualize])

Print container content

to_html([indent])

Get container information in a HTML formatted string

to_string([ui, indent])

Get container information in a string

validate_format()

Validate file format

Attributes

bytes

File size in bytes

input_type

Input data type

logger

Logger instance

md5

Checksum for file.

output_type

Output data type

valid_formats

Valid file formats