[Python] What does it mean when an audio file outputs b'' [duplicate]

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm fairly new to all that audio processing programming but I have this function that should output the raw bytes of an audio file. Instead all I get is:

    frames = wave_file.readframes(metadata.nframes)
    frames # Output: b''


    What does it really mean and why in my case doesn't it provide any insight into the raw data of the file.

    On the other hand I can get all the metadata of the file:

    metadata = wave_file.getparams()
    (nchannels, sampwidth, framerate, nframes, comptype, compname) = metadata
    filelen = nframes / framerate

    nchannels, nframes, framerate, sampwidth, filelen
    # (1, 2097152, 96000, 3, 21.845333333333333)

    Continue reading...

Compartilhe esta Página