emotion2vec+large语音情感识别基座模型large模型 已完整同步
模型列表
🚀 由 FunASR 驱动 · 阿里通义实验室开源工业级语音识别
本模型是 FunASR 语音生态的组件模型之一,可与 ASR 模型自由组合成完整流程(VAD 切分 · 标点恢复 · 说话人分离 · 情感识别)。FunASR 一行代码即可调用本模型。
⭐ 觉得好用?欢迎给我们的开源项目点 Star 支持:
GitHub 仓库: emotion2vec
| 模型 | ⭐Model Scope | 🤗Hugging Face | Fine-tuning数据量(小时) |
|---|---|---|---|
| emotion2vec | Link | Link | / |
| emotion2vec+ seed | Link | Link | 201 |
| emotion2vec+ base | Link | Link | 4788 |
| emotion2vec+ large | Link | Link | 42526 |
模型简介
emotion2vec+(emotion2vec_plus)是语音情感识别基座模型,我们致力于打造语音情感领域的Whisper,通过数据驱动方法尽可能克服语种和录制场景对情感识别的影响,获得通用、鲁棒的情感识别的能力。emotion2vec+的性能显著超过其他高下载量的huggingface开源模型。
本版本(emotion2vec_plus_seed)为使用筛选后的大规模伪标注数据进行finetune,获得的 large size(~300M)模型,目前支持的分类为: 0: angry 1: disgusted 2: fearful 3: happy 4: neutral 5: other 6: sad 7: surprised 8: unknown
数据迭代
我们提供三个版本,每个版本由前一个版本的数据迭代而来。如果需要情感表征模型,可以参考 emotion2vec。
- emotion2vec+ seed: 使用来自EmoBox学术语音情感数据进行finetune
- emotion2vec+ base: 使用筛选后的大规模伪标注数据进行finetune,获得的base size(~90M)模型
- emotion2vec+ large: 使用筛选后的大规模伪标注数据进行finetune,获得的 large size(~300M)模型
迭代流程如图所示,最终我们获得四万小时情感数据进行训练emotion2vec+ large模型。
安装环境
pip install -U funasr modelscope
用法
input: 16k Hz 的语音
granularity:
- "utterance": 提取整句语音特征
- "frame": 提取帧级别特征(50 Hz)
extract_embedding: 是否提取特征,如果只使用分类模型不需要特征这里设置为False
基于modelscope进行推理
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.emotion_recognition,
model="iic/emotion2vec_plus_large")
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进行推理
from funasr import AutoModel
model = AutoModel(model="iic/emotion2vec_plus_large")
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风格):
wav_name1 wav_path1.wav
wav_name2 wav_path2.wav
...
输出为情感表征向量,保存在output_dir中,格式为numpy格式(可以用np.load()加载)
说明
本仓库为emotion2vec的modelscope版本,模型参数完全一致。
原始仓库地址: https://github.com/ddlBoJack/emotion2vec
modelscope版本仓库:https://github.com/alibaba-damo-academy/FunASR
huggingface仓库:https://huggingface.co/emotion2vec
相关论文以及引用信息
@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}
}
12 个文件
浏览文件数据集版权信息
本数据集的许可证为 Apache License 2.0。如有违反相关条款,请联系 WEHUB,我们将及时处理。
通过 WeHub CLI 下载当前数据集快照。下列命令会固定为当前页面展示的数据版本(如果页面提供版本)。文件字节由本机直连存储下载,浏览器不会签发或保存下载链接。
前置要求
需要 Node.js 18 及以上,以及 npm(或 npx)。
1. 安装 CLI
npm install -g wehub-cli@latest
2. 下载此数据集
wehub datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67
若中断或部分失败,在同一目录重新执行同一命令即可续传。默认会校验 SHA-256。
免全局安装
npx --yes wehub-cli@latest datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67
高级选项
以下为 wehub datasets download 已支持的参数示例:
强制重新下载,不复用已校验的本地文件
wehub datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67 --overwrite
仅包含匹配路径
wehub datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67 --include "*.jsonl"
排除匹配路径
wehub datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67 --exclude "*.md"
提高并发下载数
wehub datasets download ds_iic_emotion2vec_plus_large_32a9b55e67 --revision b9c9fc7fce7dd80c0a59d9d1d1265021e31cb2e8 --output ./ds_iic_emotion2vec_plus_large_32a9b55e67 --jobs 8
完整帮助:wehub datasets download --help

