pydiogment.utils.io#

  • Description: write and read module for wave data.

pydiogment.utils.io.read_file(filename)[source]#

Read wave file as mono.

Parameters

filename (str) – wave file / path.

Returns

tuple of sampling rate and audio data.

pydiogment.utils.io.write_file(output_file_path, input_file_name, name_attribute, sig, fs)[source]#

Read wave file as mono.

Parameters
  • output_file_path (str) – path to save resulting wave file to.

  • input_file_name (str) – name of processed wave file,

  • name_attribute (str) – attribute to add to output file name.

  • sig (array) – signal/audio array.

  • fs (int) – sampling rate.

Returns

tuple of sampling rate and audio data.