Skip to content

Instantly share code, notes, and snippets.

View chief7's full-sized avatar

Tim Braun chief7

  • Berlin, Germany
View GitHub Profile
@chief7
chief7 / read_wave.py
Created February 18, 2017 13:55
Read big wave file in python (pcm, little endian) without library.
import struct
def read_wave_raw(filename):
"""
Just pass in a filename and get bytes representation of
audio data as result
:param filename: a wave file
:param rate:
:return: tuple -> data, #channels, samplerate, datatype (in bits)