This is a simple helper class to read RIFF WAVE files. It is written in Python and is intended to be used as a learning tool for understanding the RIFF WAVE file format. Most importantly, the main function is to parse the markers which is created by ocenaudio.
from riff_wave import WaveContainer
with open('test.wav', 'rb') as f:
riff_wave = WaveContainer.from_stream(f)
print(f'{riff_wave.fmt = }')
print(f'{riff_wave.duration = }')
- parse basic wave headers: fmt.
- parse wave bytes to np.ndarray.
- parse markers created by ocenaudio.
- update markers and save to new .wav file.