Resample#
- class ansys.sound.core.signal_utilities.Resample(signal=None, new_sampling_frequency=44100.0)#
Resample a signal.
Examples
Resample a signal to a new sampling frequency.
>>> from ansys.sound.core.signal_utilities import Resample >>> resample = Resample(signal=my_signal, new_sampling_frequency=48000.0) >>> resample.process() >>> resampled_signal = resample.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:
Methods
Get the resampled signal as a DPF fields container.
Get the resampled signal as a NumPy array.
Plot the resulting signals in a single figure.
Resample the signal.
Attributes
New sampling frequency in Hz.
Input signal as a DPF field or fields container.