Skip to content

No frame-level results for emotion recognition? #88

Description

@Lyumbreit22

I really like and rely on this project, but I find that I cannot obtain frame-level emotion recognition results. However, the result.json file from the webui does contain frame-level recognition results, e.g., https://blog.csdn.net/weixin_42613360/article/details/159707833 and https://blog.csdn.net/weixin_33812391/article/details/157281905

Here are my codes:

from funasr import AutoModel
model = AutoModel(model="iic/emotion2vec_plus_large", hub='modelscope',disable_update=True,device="cuda:1")
wav_file = f"{model.model_path}/example/test.wav"
rec_result = model.generate(wav_file, granularity="frame", extract_embedding=False) # granularity: "utterance" or "frame"
print(rec_result)

results

rtf_avg: 0.006: 100%|██████████| 1/1 [00:00<00:00,  5.45it/s]
[{'key': '1000_0001', 'labels': ['生气/angry', '厌恶/disgusted', '恐惧/fearful', '开心/happy', '中立/neutral', '其他/other', '难过/sad', '吃惊/surprised', '<unk>'], 'scores': [0.003793130163103342, 0.0005500566912814975, 0.0008670409442856908, 0.1217915266752243, 0.00022425848874263465, 6.993473562033614e-06, 0.8683823943138123, 0.004384305793792009, 2.399044376488746e-07]}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions