# WAVE

Microsoft WAVE/RIFF audio file/stream information and tags.

class mutagen.wave.WAVE(filename)

  Bases: `FileType`

  WAVE(filething)

  A Waveform Audio File Format (WAVE, or more commonly known as WAV due to its filename extension)

  Parameters:

    filething (filething)

  tags
    Type:

      `mutagen.id3.ID3`

  info
    Type:

      `WaveStreamInfo`

  static score(filename, fileobj, header)

    Returns a score for how likely the file can be parsed by this type.

    Parameters:

      - filename (fspath) – a file path

      - fileobj (fileobj) – a file object open in rb mode. Position is undefined

      - header (bytes) – data of undefined length, starts with the start of the file.

    Returns:

      negative if definitely not a matching type, otherwise a score,

        the bigger the more certain that the file can be loaded.

    Return type:

      int

  add_tags()

    Add an empty ID3 tag to the file.

  load(filething, **kwargs)

    Load stream and tag information from a file.

class mutagen.wave.WaveStreamInfo

  WaveStreamInfo()

  Microsoft WAVE file information.

  Information is parsed from the ‘fmt’ & ‘data’chunk of the RIFF/WAVE file

  length

    audio length, in seconds

    Type:

      `float`

  bitrate

    audio bitrate, in bits per second

    Type:

      `int`

  channels

    The number of audio channels

    Type:

      `int`

  sample_rate

    audio sample rate, in Hz

    Type:

      `int`

  bits_per_sample

    The audio sample size

    Type:

      `int`

  pprint()
    Returns:

      Print stream information

    Return type:

      text