(pspec,
                          samplerate=16000,
                          nfilt=26,
                          nfft=512,
                          lowfreq=0,
                          highfreq=None)
return numpy.log(feat)
Log fbank from power spectrum.
Log fbank from power spectrum.
Log fbank from power spectrum .
def logfbank_from_powspec(pspec,
                          samplerate=16000,
                          nfilt=26,
                          nfft=512,
                          lowfreq=0,
                          highfreq=None):
  ''' Log fbank from power spectrum. '''
  energy = numpy.sum(pspec, 1)  # this stores the total energy in each frame
  energy = numpy.where(energy == 0,
                       numpy.finfo(float).eps,
                       energy)  # if energy is zero, we get problems with log

  fb = get_filterbanks(nfilt, nfft, samplerate, lowfreq, highfreq)
  feat = numpy.dot(pspec, fb.T)  # compute the filterbank energies
  feat = numpy.where(feat == 0,
                     numpy.finfo(float).eps,
                     feat)  # if feat is zero, we get problems with log

  return numpy.log(feat)
def logfbank_from_powspec ( pspec , samplerate = 16000 , nfilt = 26 , nfft = 512 , lowfreq = 0 , highfreq = None ) : energy = numpy . sum ( pspec , 1 ) # this stores the total energy in each frame energy = numpy . where ( energy == 0 , numpy . finfo ( float ) . eps , energy ) # if energy is zero, we get problems with log fb = get_filterbanks ( nfilt , nfft , samplerate , lowfreq , highfreq ) feat = numpy . dot ( pspec , fb . T ) # compute the filterbank energies feat = numpy . where ( feat == 0 , numpy . finfo ( float ) . eps , feat ) # if feat is zero, we get problems with log return numpy . log ( feat )