findEmotion.py 文件源码

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

项目:openEMO 作者: adit-39 项目源码 文件源码
def test_emo(test_file, gmms):
    """
        NOTE: Use only after training.
        Test a given file and predict an emotion for it.
    """
    rate, sig = wvf.read(test_file)
    mfcc_feat = mfcc(sig, rate)
    pred = {}
    for emo in gmms:
        pred[emo] = gmms[emo].score(mfcc_feat)
    return emotions_nbest(pred, 2), pred
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号