(wav_data_tensor, hparams, jitter_amount_sec)
return tf.py_func(
      transform_wav_data, [wav_data_tensor],
      tf.string,
      name='transform_wav_data_op')
Transforms with audio for data augmentation. Only for training.
Transforms with audio for data augmentation. Only for training.
Transforms with audio for data augmentation . Only for training .
def transform_wav_data_op(wav_data_tensor, hparams, jitter_amount_sec):
  """Transforms with audio for data augmentation. Only for training."""

  def transform_wav_data(wav_data):
    """Transforms with sox."""
    if jitter_amount_sec:
      wav_data = audio_io.jitter_wav_data(wav_data, hparams.sample_rate,
                                          jitter_amount_sec)
    wav_data = audio_transform.transform_wav_audio(wav_data, hparams)

    return [wav_data]

  return tf.py_func(
      transform_wav_data, [wav_data_tensor],
      tf.string,
      name='transform_wav_data_op')
def transform_wav_data_op ( wav_data_tensor , hparams , jitter_amount_sec ) : def transform_wav_data ( wav_data ) : """Transforms with sox.""" if jitter_amount_sec : wav_data = audio_io . jitter_wav_data ( wav_data , hparams . sample_rate , jitter_amount_sec ) wav_data = audio_transform . transform_wav_audio ( wav_data , hparams ) return [ wav_data ] return tf . py_func ( transform_wav_data , [ wav_data_tensor ] , tf . string , name = 'transform_wav_data_op' )