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.ndarray buffer to a WAV file using Prestosynth’s writer.

Parameters:
  • path – Destination path.

  • buffernumpy.ndarray with shape (samples,) or (channels, samples).

  • sample_rate – Sample rate in Hz.

  • use_int16 – Set to True to quantize the float32 buffer to PCM16.