(feat, feat_size, order=2)
return feat
add delta detla
add delta detla
add delta detla
def add_delta_delta(feat, feat_size, order=2):
  ''' add delta detla '''
  feat_name = 'delta_delta'
  graph = None
  # get session
  if feat_name not in _global_sess:
    graph = tf.Graph()
    #pylint: disable=not-context-manager
    with graph.as_default():
      fbank = tf.placeholder(
          dtype=tf.float32, shape=[None, feat_size, 1], name='fbank')
      feat_with_delta_delta = speech_ops.delta_delta(fbank, order=order)
      feat_with_delta_delta = tf.identity(feat_with_delta_delta, name=feat_name)

  sess = _get_session(feat_name, graph)
  feat = sess.run(
      _get_out_tensor_name(feat_name, 0), feed_dict={'fbank:0': feat})
  return feat
def add_delta_delta ( feat , feat_size , order = 2 ) : feat_name = 'delta_delta' graph = None # get session if feat_name not in _global_sess : graph = tf . Graph ( ) #pylint: disable=not-context-manager with graph . as_default ( ) : fbank = tf . placeholder ( dtype = tf . float32 , shape = [ None , feat_size , 1 ] , name = 'fbank' ) feat_with_delta_delta = speech_ops . delta_delta ( fbank , order = order ) feat_with_delta_delta = tf . identity ( feat_with_delta_delta , name = feat_name ) sess = _get_session ( feat_name , graph ) feat = sess . run ( _get_out_tensor_name ( feat_name , 0 ) , feed_dict = { 'fbank:0' : feat } ) return feat