Open byungsoo-oh opened 2 years ago
Hi @byungsoo-oh,
You can just use the slice
operator, but you decode the sample fully first and then trim it (or pad using pad
operator).
Still, it sounds like a good enhancement idea. Can you tell me about your particular use case?
Hi @JanuszL, thank you for the kind reply! I solved the issue with slice
operator as you suggested :)
I have been trying to implement DALI pipeline of MelGAN with LJSpeech dataset (originally written in TensorFlow [code]). It decodes audio data while making the length of the samples uniform, which then is mapped to a spectrogram. You can refer to the details in the above code link.
Thanks a lot for the help!
@byungsoo-oh thanks! We will look into it.
Hi, I would like to decode audio files (wav format) while making each sample have the uniform length.
Specifically, I am trying to implement exactly the same operation as
tf.audio.decode_wav()
in DALI pipeline.While
desired_samples
parameter intf.audio.decode_wav()
enables audio to be cropped or padded to the requested length, it seems thatnvidia.dali.fn.decoders.audio
does not provide such option.I tried to find a DALI operator that crops audio file to desired length, but I could not find one from operation reference in DALI docs.
Is there any way I can perform the desired task using DALI?
Thanks a lot.