LoadWav#
- class ansys.sound.core.signal_utilities.LoadWav(path_to_wav='')#
Load a signal, and its sampling frequency and format from a WAV file.
See also
Examples
Load a signal from a WAV file.
>>> from ansys.sound.core.signal_utilities import LoadWav >>> load_wav = LoadWav(path_to_wav="path/to/file.wav") >>> load_wav.process() >>> signal = load_wav.get_output()
See also
- Basic operations on a signal from a WAV file
Example demonstrating how to load, resample, amplify, and write WAV files.
Class instantiation takes the following parameters.
- Parameters:
- path_to_wav
str, 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_wavattribute.
- path_to_wav
Methods
Get the format of the loaded WAV file.
Get the signal loaded from the WAV file as list of DPF fields.
Get the signal loaded from the WAV file as a NumPy array.
Get the sampling frequency in Hz of the loaded signal.
Plot the resulting signals in a single figure.
Load the WAV file.
Attributes
Path to the WAV file.