code: from __future__ import print_function
  import tensorflow as tf
  from ops import *
  import numpy as np
  
  
  def pre_emph(x, coeff=0.95):
      x0 = tf.reshape(x[0], [1,])
      diff = x[1:] - coeff * x[:-1]
      concat = tf.concat([x0, diff], 0)
      return concat
  
  def de_emph(y, coeff=0.95):
      if coeff <= 0:
          return y
      x = np.zeros(y.shape[0], dtype=np.float32)
      x[0] = y[0]
      for n in range(1, y.shape[0], 1):
          x[n] = coeff * x[n - 1] + y[n]
      return x
  
  def read_and_decode(filename_queue, canvas_size, preemph=0.):
      reader = tf.TFRecordReader()
      _, serialized_example = reader.read(filename_queue)
      features = tf.parse_single_example(
              serialized_example,
              features={
                  'wav_raw': tf.FixedLenFeature([], tf.string),
                  'noisy_raw': tf.FixedLenFeature([], tf.string),
              })
      wave = tf.decode_raw(features['wav_raw'], tf.int32)
      wave.set_shape(canvas_size)
      wave = (2./65535.) * tf.cast((wave - 32767), tf.float32) + 1.
      noisy = tf.decode_raw(features['noisy_raw'], tf.int32)
      noisy.set_shape(canvas_size)
      noisy = (2./65535.) * tf.cast((noisy - 32767), tf.float32) + 1.
  
      if preemph > 0:
          wave = tf.cast(pre_emph(wave, preemph), tf.float32)
          noisy = tf.cast(pre_emph(noisy, preemph), tf.float32)
  
      return wave, noisy
  
apis: tensorflow.concat tensorflow.FixedLenFeature tensorflow.decode_raw tensorflow.reshape tensorflow.cast tensorflow.TFRecordReader numpy.zeros
api_extract: [(8, 'tensorflow.reshape', 'tf.reshape', (['x[0]', '[1]'], {}), True, 'import tensorflow as tf\n'), (10, 'tensorflow.concat', 'tf.concat', (['[x0, diff]', '(0)'], {}), True, 'import tensorflow as tf\n'), (16, 'numpy.zeros', 'np.zeros', (['y.shape[0]'], {'dtype': 'np.float32'}), True, 'import numpy as np\n'), (23, 'tensorflow.TFRecordReader', 'tf.TFRecordReader', ([], {}), True, 'import tensorflow as tf\n'), (31, 'tensorflow.decode_raw', 'tf.decode_raw', (["features['wav_raw']", 'tf.int32'], {}), True, 'import tensorflow as tf\n'), (34, 'tensorflow.decode_raw', 'tf.decode_raw', (["features['noisy_raw']", 'tf.int32'], {}), True, 'import tensorflow as tf\n'), (33, 'tensorflow.cast', 'tf.cast', (['(wave - 32767)', 'tf.float32'], {}), True, 'import tensorflow as tf\n'), (36, 'tensorflow.cast', 'tf.cast', (['(noisy - 32767)', 'tf.float32'], {}), True, 'import tensorflow as tf\n'), (28, 'tensorflow.FixedLenFeature', 'tf.FixedLenFeature', (['[]', 'tf.string'], {}), True, 'import tensorflow as tf\n'), (29, 'tensorflow.FixedLenFeature', 'tf.FixedLenFeature', (['[]', 'tf.string'], {}), True, 'import tensorflow as tf\n')]