Input/Output

pyvoimooo.readwav(filepath)

Read a waveform from a lossless encoding using libsndfile.

Parameters

filepath (str) – The file from which to read the waveform.

Returns

  • wav (array<float>) - The waveform as an array of floats

  • fs (int,Hz) - The sampling frequency.

Note

If the corresponding functions cannot be found in the wrapper (e.g. Voimooo has been compiled without libsndfile support), scipy.io.wavfile.read will be used instead, thus supporting only simple PCM wav format.

New in version 0.8.9.

pyvoimooo.writewav(filepath, fs, wav)

Write down a waveform into a file using a PCM wav format.

Parameters
  • filepath (str) – The file where the waveform is written.

  • fs (int, Hz) – The sampling rate.

  • wav (array<float>) – The waveform.

Note

If the corresponding functions cannot be found in the wrapper (e.g. Voimooo has been compiled without libsndfile support), scipy.io.wavfile.write will be used instead.

New in version 0.8.9.