WriteWav#

class ansys.sound.core.signal_utilities.WriteWav(signal=None, path_to_write='', bit_depth='float32')#

Writes a signal into a WAV file.

Class instantiation takes the following parameters.

Parameters:
signalFieldsContainer, default: None

Signal to write to a WAV file. Each channel in the DPF fields container is a field.

path_to_writestr, default: ‘’

Path for the WAV file. This parameter can be set during the instantiation of the object or with the LoadWav.set_path() method.

bit_depthstr, default: ‘float32’

Bit depth. Options are 'float32', 'int32', 'int16', and 'int8'. These mean that the samples are coded into the WAV file using 32 bits (32-bit IEEE Float), 32 bits (int), 16 bits (int), or 8 bits (int), respectively.

Methods

WriteWav.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

WriteWav.get_output()

Get output.

WriteWav.get_output_as_nparray()

Get output as a NumPy array.

WriteWav.plot()

Plot the output.

WriteWav.process()

Write the signal to a WAV file.

Attributes

WriteWav.bit_depth

Bit depth.

WriteWav.path_to_write

Path of the WAV file to write.

WriteWav.signal

Input signal as a DPF fields container.