Skip to main content

class Audio

(data_or_path: 'str | pathlib.Path | list | np.ndarray',
sample_rate: 'int | None' = None,
caption: 'str | None' = None)

Description

W&B class for audio clips.

Args

  • data_or_path: A path to an audio file or a NumPy array of audio data.
  • sample_rate: Sample rate, required when passing in raw NumPy array of audio data.
  • caption: Caption to display with audio.

Methods

method durations

(audio_list)
Calculate the duration of the audio files.
Arguments
  • audio_list:

method sample_rates

(audio_list)
Get sample rates of the audio files.
Arguments
  • audio_list: