symusic.dump_wav¶
- dump_wav(path: str, data: ndarray[dtype=float32, shape=(*, *), order='F', device='cpu'], sample_rate: int, use_int16: bool = True) None¶
Write a
numpy.ndarraybuffer to a WAV file using Prestosynth’s writer.- Parameters:
path – Destination path.
buffer –
numpy.ndarraywith shape(samples,)or(channels, samples).sample_rate – Sample rate in Hz.
use_int16 – Set to
Trueto quantize the float32 buffer to PCM16.