Converts a numeric vector, as delivered by the backend, into a
torch_tensor of shape (channels x samples).
If provided by the backend, attributes "channels" and "sample_rate" will be used.
transform_to_tensor( audio, out = NULL, normalization = TRUE, channels_first = TRUE )
(numeric): A numeric vector, as delivered by the backend.
(Tensor): An optional output tensor to use instead of creating one. (Default:
(bool, float or function): Optional normalization.
TRUE, then output is divided by
bits info is not available it assumes the input is signed 32-bit audio.
numeric, then output is divided by that number.
function, then the output is passed as a parameter to the given function,
then the output is divided by the result. (Default:
(bool): Set channels first or length first in result. (Default:
list(Tensor, int), containing - the audio content, encoded as `[C x L]` or `[L x C]` where L is the number of audio frames and C is the number of channels- the sample rate of the audio (as listed in the metadata of the file)