(self, audio_data, sample_rate=None)
Caculate fbank && pitch(concat) features of wav.
    :param audio_data: the audio signal from which to compute spectrum.
                       Should be an (1, N) tensor.
    :param sample_rate: the samplerate of the signal we working with.
    :return: A tensor with shape (num_frames, dim_features), containing
            fbank && pitch feature of every frame in speech.
Caculate fbank && pitch(concat) features of wav.
    :param audio_data: the audio signal from which to compute spectrum.
                       Should be an (1, N) tensor.
    :param sample_rate: the samplerate of the signal we working with.
    :return: A tensor with shape (num_frames, dim_features), containing
            fbank && pitch feature of every frame in speech.
Caculate fbank && pitch ( concat ) features of wav . : param audio_data : the audio signal from which to compute spectrum . Should be an ( 1 N ) tensor . : param sample_rate : the samplerate of the signal we working with . : return : A tensor with shape ( num_frames dim_features ) containing fbank && pitch feature of every frame in speech .
def call(self, audio_data, sample_rate=None):
    """
    Caculate fbank && pitch(concat) features of wav.
    :param audio_data: the audio signal from which to compute spectrum.
                       Should be an (1, N) tensor.
    :param sample_rate: the samplerate of the signal we working with.
    :return: A tensor with shape (num_frames, dim_features), containing
            fbank && pitch feature of every frame in speech.
    """

    p = self.config
    with tf.name_scope('fbank_pitch'):

      if sample_rate == None:
        sample_rate = tf.constant(p.sample_rate, dtype=tf.int32)

      assert_op = tf.assert_equal(
          tf.constant(p.sample_rate), tf.cast(sample_rate, dtype=tf.int32))
      with tf.control_dependencies([assert_op]):

        fbank_feats = tf.squeeze(self.fbank(audio_data, sample_rate))
        pitch_feats = tf.squeeze(self.pitch(audio_data, sample_rate))
        fbank_pitch_feats = tf.concat([fbank_feats, pitch_feats], 1)

        return fbank_pitch_feats
def call ( self , audio_data , sample_rate = None ) : p = self . config with tf . name_scope ( 'fbank_pitch' ) : if sample_rate == None : sample_rate = tf . constant ( p . sample_rate , dtype = tf . int32 ) assert_op = tf . assert_equal ( tf . constant ( p . sample_rate ) , tf . cast ( sample_rate , dtype = tf . int32 ) ) with tf . control_dependencies ( [ assert_op ] ) : fbank_feats = tf . squeeze ( self . fbank ( audio_data , sample_rate ) ) pitch_feats = tf . squeeze ( self . pitch ( audio_data , sample_rate ) ) fbank_pitch_feats = tf . concat ( [ fbank_feats , pitch_feats ] , 1 ) return fbank_pitch_feats