def mfcc(signal, samplerate, conf):
'''
Compute MFCC features from an audio signal.
??????????MFCC????
Args:
???
signal: the audio signal from which to compute features. Should be an
N*1 array
?????????????????????N*1???
samplerate: the samplerate of the signal we are working with.
??????????
conf: feature configuration
?????
Returns:
????
A numpy array of size (NUMFRAMES by numcep) containing features. Each
row holds 1 feature vector, a numpy vector containing the signal
log-energy
???????????numpy?????????????????numpy???????????
'''
feat, energy = fbank(signal, samplerate, conf)
feat = numpy.log(feat)
feat = dct(feat, type=2, axis=1, norm='ortho')[:, :int(conf['numcep'])]
feat = lifter(feat, float(conf['ceplifter']))
return feat, numpy.log(energy)
feature_computer.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录