feature_computer.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ASRT_SpeechRecognition 作者: nl8590687 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号