code: def rnnt_train_pipe(
      files,
      sample_rate,
      pad_amount=0,
      preemph_coeff=0.97,
      window_size=0.02,
      window_stride=0.01,
      window="hann",
      nfeatures=64,
      nfft=512,
      frame_splicing_stack=1,
      frame_splicing_subsample=1,
      lowfreq=0.0,
      highfreq=None,
      normalize_type="per_feature",
      speed_perturb=False,
      silence_trim=False,
      device="cpu",
  ):
      assert (
          normalize_type == "per_feature"
          or normalize_type == "all_features"
      )
      norm_axes = [1] if normalize_type == "per_feature" else [0, 1]
      win_len, win_hop = win_args(
          sample_rate, window_size, window_stride
      )
      window_fn = torch_windows.get(window, None)
      window_fn_arg = (
          window_fn(win_len, periodic=False).numpy().tolist()
          if window_fn
          else None
      )
  
      data, _ = fn.readers.file(
          files=files, device="cpu", random_shuffle=False
      )
      audio, _ = fn.decoders.audio(
          data, dtype=types.FLOAT, downmix=True
      )
  
      # splicing with subsampling doesn't work if audio_len is a GPU data node
      if device == "gpu" and frame_splicing_subsample == 1:
          audio = audio.gpu()
  
      # Speed perturbation 0.85x - 1.15x
      if speed_perturb:
          target_sr_factor = fn.random.uniform(
              device="cpu", range=(1 / 1.15, 1 / 0.85)
          )
          audio = fn.audio_resample(audio, scale=target_sr_factor)
  
      # Silence trimming
      if silence_trim:
          begin, length = fn.nonsilent_region(audio, cutoff_db=-80)
          audio = audio[begin : begin + length]
  
      audio_shape = fn.shapes(audio, dtype=types.INT32)
      orig_audio_len = audio_shape[0]
  
      # If we couldn't move to GPU earlier, do it now
      if device == "gpu" and frame_splicing_subsample > 1:
          audio = audio.gpu()
  
      if pad_amount > 0:
          audio_len = orig_audio_len + 2 * pad_amount
          padded_audio = dali_reflect_pad_graph(audio, pad_amount)
      else:
          audio_len = orig_audio_len
          padded_audio = audio
  
      # Preemphasis filter
      preemph_audio = fn.preemphasis_filter(
          padded_audio, preemph_coeff=preemph_coeff, border="zero"
      )
  
      # Spectrogram
      spec_len = audio_len // win_hop + 1
      spec = fn.spectrogram(
          preemph_audio,
          nfft=nfft,
          window_fn=window_fn_arg,
          window_length=win_len,
          window_step=win_hop,
          center_windows=True,
          reflect_padding=True,
      )
      # Mel spectrogram
      mel_spec = fn.mel_filter_bank(
          spec,
          sample_rate=sample_rate,
          nfilter=nfeatures,
          freq_low=lowfreq,
          freq_high=highfreq,
      )
  
      # Log
      log_features = fn.to_decibels(
          mel_spec + 1e-20,
          multiplier=np.log(10),
          reference=1.0,
          cutoff_db=-80,
      )
  
      # Frame splicing
      if frame_splicing_stack > 1 or frame_splicing_subsample > 1:
          log_features_spliced = dali_frame_splicing_graph(
              log_features,
              nfeatures,
              spec_len,
              stacking=frame_splicing_stack,
              subsampling=frame_splicing_subsample,
          )
      else:
          log_features_spliced = log_features
  
      # Normalization
      if normalize_type:
          norm_log_features = fn.normalize(
              log_features_spliced,
              axes=norm_axes,
              device=device,
              epsilon=4e-5,
              ddof=1,
          )
      else:
          norm_log_features = log_features_spliced
  
      return (
          norm_log_features,
          log_features_spliced,
          log_features,
          mel_spec,
          spec,
          preemph_audio,
          padded_audio,
          audio,
      )
  
imports: import nose_utils
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  import nvidia.dali.types
  from test_utils import get_files, to_array
  import numpy
  import librosa
  import torch
  import math
  import random
  import os
  from nose.tools import nottest
label_desc: Use image node_id 14 for calling a global function with example usage: rnnt_train_pipe(files, sample_rate, pad_amount, preemph_coeff, window_size, window_stride, window, nfeatures, nfft, frame_splicing_stack, frame_splicing_subsample, lowfreq, highfreq, normalize_type, speed_perturb, silence_trim, device) and returns: norm_log_features,  log_features_spliced,  log_features,  mel_spec,  spec,  preemph_audio,  padded_audio,  audio