(signal,
         samplerate=16000,
         winlen=0.025,
         winstep=0.01,
         numcep=13,
         nfilt=26,
         nfft=512,
         lowfreq=0,
         highfreq=None,
         preemph=0.97,
         ceplifter=22,
         append_energy=True,
         winfunc=lambda x: numpy.ones((x,)))
return feat
Compute MFCC features from an audio signal.

    :param signal: the audio signal from which to compute features. Should be an N*1 array
    :param samplerate: the samplerate of the signal we are working with.
    :param winlen: the length of the analysis window in seconds. Default is 0.025s (25 milliseconds)
    :param winstep: the step between successive windows in seconds. Default is 0.01s (10 milliseconds)
    :param numcep: the number of cepstrum to return, default 13
    :param nfilt: the number of filters in the filterbank, default 26.
    :param nfft: the FFT size. Default is 512.
    :param lowfreq: lowest band edge of mel filters. In Hz, default is 0.
    :param highfreq: highest band edge of mel filters. In Hz, default is samplerate/2
    :param preemph: apply preemphasis filter with preemph as coefficient. 0 is no filter. Default is 0.97.
    :param ceplifter: apply a lifter to final cepstral coefficients. 0 is no lifter. Default is 22.
    :param appendEnergy: if this is true, the zeroth cepstral coefficient is replaced with the log of the total frame energy.
    :param winfunc: the analysis window to apply to each frame. By default no window is applied. You can use numpy window functions here e.g. winfunc=numpy.hamming
    :returns: A numpy array of size (NUMFRAMES by numcep) containing features. Each row holds 1 feature vector.
Compute MFCC features from an audio signal.
Compute MFCC features from an audio signal .
def mfcc(signal,
         samplerate=16000,
         winlen=0.025,
         winstep=0.01,
         numcep=13,
         nfilt=26,
         nfft=512,
         lowfreq=0,
         highfreq=None,
         preemph=0.97,
         ceplifter=22,
         append_energy=True,
         winfunc=lambda x: numpy.ones((x,))):
  """Compute MFCC features from an audio signal.

    :param signal: the audio signal from which to compute features. Should be an N*1 array
    :param samplerate: the samplerate of the signal we are working with.
    :param winlen: the length of the analysis window in seconds. Default is 0.025s (25 milliseconds)
    :param winstep: the step between successive windows in seconds. Default is 0.01s (10 milliseconds)
    :param numcep: the number of cepstrum to return, default 13
    :param nfilt: the number of filters in the filterbank, default 26.
    :param nfft: the FFT size. Default is 512.
    :param lowfreq: lowest band edge of mel filters. In Hz, default is 0.
    :param highfreq: highest band edge of mel filters. In Hz, default is samplerate/2
    :param preemph: apply preemphasis filter with preemph as coefficient. 0 is no filter. Default is 0.97.
    :param ceplifter: apply a lifter to final cepstral coefficients. 0 is no lifter. Default is 22.
    :param appendEnergy: if this is true, the zeroth cepstral coefficient is replaced with the log of the total frame energy.
    :param winfunc: the analysis window to apply to each frame. By default no window is applied. You can use numpy window functions here e.g. winfunc=numpy.hamming
    :returns: A numpy array of size (NUMFRAMES by numcep) containing features. Each row holds 1 feature vector.
    """
  feat, energy = fbank(signal, samplerate, winlen, winstep, nfilt, nfft,
                       lowfreq, highfreq, preemph, winfunc)
  feat = numpy.log(feat)
  feat = dct(feat, type=2, axis=1, norm='ortho')[:, :numcep]
  feat = lifter(feat, ceplifter)
  if append_energy:
    feat[:, 0] = numpy.log(
        energy)  # replace first cepstral coefficient with log of frame energy
  return feat
def mfcc ( signal , samplerate = 16000 , winlen = 0.025 , winstep = 0.01 , numcep = 13 , nfilt = 26 , nfft = 512 , lowfreq = 0 , highfreq = None , preemph = 0.97 , ceplifter = 22 , append_energy = True , winfunc = lambda x : numpy . ones ( ( x , ) ) ) : feat , energy = fbank ( signal , samplerate , winlen , winstep , nfilt , nfft , lowfreq , highfreq , preemph , winfunc ) feat = numpy . log ( feat ) feat = dct ( feat , type = 2 , axis = 1 , norm = 'ortho' ) [ : , : numcep ] feat = lifter ( feat , ceplifter ) if append_energy : feat [ : , 0 ] = numpy . log ( energy ) # replace first cepstral coefficient with log of frame energy return feat