Path to directory containing .wav files annotated by the .xml file.
If not specified, defaults to directory “Wave”, relative to the parent
of xml_path. E.g., if xml_path is ‘Bird0/Annotation.xml’
as shown below, then wav_path defaults to ‘Bird0/Wave’.
Path in which wav files listed in Annotation.xml file are found.
Defaults to a directory Wave that is located in the parent directory of
the Annotation.xml file, which matches the structure of the dataset from [1]_.
Convert this set of 'birdsong-recognition-dataset'
annotations to a list of crowsetta.Annotation instances.
Parameters:
round_times (bool) – If True, round times of onsets and offsets.
Default is True.
decimals (int) – Number of decimals places to round floating point numbers to.
Only meaningful if round_times is True.
Default is 3, so that times are rounded to milliseconds.
samplerate – Sampling rate for wave files. Used to convert
position and length attributes of
BirdsongRecSyllable from sample number
to seconds. Default is None, in which ths function
tries to open each .wav file and determine
the actual sampling rate. If this does not work,
then the onsets_s and offsets_s attributes
of the crowsetta.Sequence are left as None.
The round_times and decimals arguments are provided
to reduce differences across platforms
due to floating point error, e.g., when loading
annotation files and then sending them to a csv file,
the result should be the same on Windows and Linux.
The samplerate argument is provided to make it possible
to convert onset and offset times from sample number to seconds,
even without the original audio files.
By default it is None, and the default
location for the .wav files is used.
If you need to specify some other location for the .wav files,
pass in the wavpath argument when you first load the annotations:
Convert this set of 'birdsong-recognition-dataset'
annotations to a list of crowsetta.Sequence instances.
Parameters:
round_times (bool) – If True, round times of onsets and offsets.
Default is True.
decimals (int) – Number of decimals places to round floating point numbers to.
Only meaningful if round_times is True.
Default is 3, so that times are rounded to milliseconds.
samplerate (int) – Sampling rate for wave files. Used to convert
position and length attributes of
BirdsongrecSyllable from sample number
to seconds. Default is None, in which ths function
tries to open each .wav file and determine
the actual sampling rate. If this does not work,
then the onsets_s and offsets_s attributes
of the crowsetta.Sequence are left as None.
The round_times and decimals arguments are provided
to reduce differences across platforms
due to floating point error, e.g., when loading
annotation files and then sending them to a csv file,
the result should be the same on Windows and Linux.
The samplerate argument is provided to make it possible
to convert onset and offset times from sample number to seconds,
even without the original audio files.
By default it is None, and the default
location for the .wav files is used.
If you need to specify some other location for the .wav files,
pass in the wavpath argument when you first load the annotations: