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:
- signal
FieldsContainer
, default:None
Signal to write to a WAV file. Each channel in the DPF fields container is a field.
- path_to_write
str
, 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_depth
str
, 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.
- signal
Methods
Convert a DPF fields container to a NumPy array.
Get output.
Get output as a NumPy array.
Plot the output.
Write the signal to a WAV file.
Attributes
Bit depth.
Path of the WAV file to write.
Input signal as a DPF fields container.