---
title: emotion2vec_base_finetuned
canonical_url: "https://www.modelscope.cn/models/iic/emotion2vec_base_finetuned"
md_url: "https://www.modelscope.cn/models/iic/emotion2vec_base_finetuned.md"
repository: iic/emotion2vec_base_finetuned
chinese_name: "emotion2vec情感通用表征微调模型"
last_updated: 2026-03-16
license: "Apache License 2.0"
pipeline_tag: emotion-recognition
tasks:
  - emotion-recognition
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 645165
stars: 62
---

# emotion2vec_base_finetuned

> emotion2vec_base_finetuned - iic 在 ModelScope 开源的模型。基于emotion2vec结构的微调模型，输入音频，输入为情感分类概率。支持提取情感特征向量。

iic/emotion2vec_base_finetuned 是 ModelScope 魔搭社区上的emotion-recognition模型，采用 Apache License 2.0 许可。

- **Repository**: iic/emotion2vec_base_finetuned
- **License**: Apache License 2.0
- **Tasks**: emotion-recognition
- **Downloads**: 645165
- **Stars**: 62
- **Last updated**: 2026-03-16

Source: https://www.modelscope.cn/models/iic/emotion2vec_base_finetuned

---

<div align="center">
    <h1>
    EMOTION2VEC
    </h1>
    <p>
    emotion2vec通用语音情感表征模型 <br>
    <b><em>emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation</em></b>
    </p>
    <p>
    <img src="logo.png" style="width: 200px; height: 200px;">
    </p>
    <p>
    </p>
</div>

# 模型简介
emotion2vec是第一个通用的语音情感表征模型。通过自监督预训练，emotion2vec能够在不同的任务、语言和场景中提取情感表征。

该版本权重为多轮迭代微调获得的9分类情感识别模型。首先使用语音情感识别学术数据集fine-tune emotion2vec，然后对15万小时中英数据进行标注，筛选文本情感与语音情感相同，并且置信度高的数据（超过1万小时）再次fine-tune emotion2vec，获得该版本权重。

目前支持的分类为：
    0: angry
    1: disgusted
    2: fearful
    3: happy
    4: neutral
    5: other
    6: sad
    7: surprised
    8: unknown

# 安装环境

`pip install -U funasr modelscope`

# 用法

input: 16k Hz 的语音

granularity:
- "utterance": 提取整句语音特征
- "frame": 提取帧级别特征(50 Hz)

extract_embedding: 是否提取特征，如果只使用分类模型不需要特征这里设置为False

## 基于modelscope进行推理

```python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

inference_pipeline = pipeline(
    task=Tasks.emotion_recognition,
    model="iic/emotion2vec_base_finetuned")

rec_result = inference_pipeline('https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav', granularity="utterance", extract_embedding=False)
print(rec_result)
```


## 基于FunASR进行推理

```python
from funasr import AutoModel

model = AutoModel(model="iic/emotion2vec_base_finetuned")

wav_file = f"{model.model_path}/example/test.wav"
res = model.generate(wav_file, output_dir="./outputs", granularity="utterance", extract_embedding=False)
print(res)
```
注：模型会自动下载

支持输入文件列表，wav.scp（kaldi风格）：
```cat wav.scp
wav_name1 wav_path1.wav
wav_name2 wav_path2.wav
...
```

输出为情感表征向量，保存在`output_dir`中，格式为numpy格式（可以用np.load()加载）

# 说明

本仓库为emotion2vec的modelscope版本，模型参数完全一致。

原始仓库地址: [https://github.com/ddlBoJack/emotion2vec](https://github.com/ddlBoJack/emotion2vec)

modelscope版本仓库：[https://github.com/alibaba-damo-academy/FunASR](https://github.com/alibaba-damo-academy/FunASR/tree/funasr1.0/examples/industrial_data_pretraining/emotion2vec)

# 相关论文以及引用信息
```BibTeX
@article{ma2023emotion2vec,
  title={emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation},
  author={Ma, Ziyang and Zheng, Zhisheng and Ye, Jiaxin and Li, Jinchao and Gao, Zhifu and Zhang, Shiliang and Chen, Xie},
  journal={arXiv preprint arXiv:2312.15185},
  year={2023}
}
```
