LoadWav#

class ansys.sound.core.signal_utilities.LoadWav(path_to_wav='')#

Load a signal, and its sampling frequency and format from a WAV file.

Class instantiation takes the following parameters.

Parameters:
path_to_wavstr, default: “”

Path to the WAV file to load. The path can be set during the instantiation of the object or with the LoadWav.path_to_wav attribute.

Methods

LoadWav.get_format()

Get the format of the loaded WAV file.

LoadWav.get_output()

Get the signal loaded from the WAV file as a DPF fields container.

LoadWav.get_output_as_nparray()

Get the signal loaded from the WAV file as a NumPy array.

LoadWav.get_sampling_frequency()

Get the sampling frequency in Hz of the loaded signal.

LoadWav.plot()

Plot the resulting signals in a single figure.

LoadWav.process()

Load the WAV file.

Attributes

LoadWav.path_to_wav

Path to the WAV file.