vak.prep.frame_classification.validators.validate_and_get_frame_dur#
- vak.prep.frame_classification.validators.validate_and_get_frame_dur(dataset_df: DataFrame, input_type: str) float [source]#
Validate that there is a single, unique value for the frame duration for all samples (audio signals / spectrograms) in a dataset. If so, return that value.
The dataset is represented as a pandas DataFrame.
- Parameters:
dataset_df (pandas.Dataframe) β A pandas.DataFrame created by
vak.prep.spectrogram_dataset.prep_spectrogram_dataset()
orvak.prep.audio_dataset.prep_audio_dataset()
.input_type (str) β The type of input to the neural network model. One of {βaudioβ, βspectβ}.
- Returns:
frame_dur β The duration of a time bin in seconds for all spectrograms in the dataset.
- Return type: