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
评论列表
文章目录