Skip to main content
GitHub source

class Audio

W&B class for audio clips.

method Audio.__init__

Accept a path to an audio file or a numpy array of audio data. 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.

classmethod Audio.durations

Calculate the duration of the audio files.

classmethod Audio.sample_rates

Get sample rates of the audio files.