[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ddlBoJack--emotion2vec":3,"tool-ddlBoJack--emotion2vec":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":95,"forks":96,"last_commit_at":97,"license":79,"difficulty_score":23,"env_os":98,"env_gpu":99,"env_ram":100,"env_deps":101,"category_tags":108,"github_topics":109,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":114,"updated_at":115,"faqs":116,"releases":146},3374,"ddlBoJack\u002Femotion2vec","emotion2vec","[ACL 2024] Official PyTorch code for extracting features and training downstream models with emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation","emotion2vec 是一款专为语音情感识别打造的开源基础模型，旨在通过自监督预训练技术，让机器更精准地理解人类语音中的情绪变化。它有效解决了传统方法依赖大量标注数据、跨语言泛化能力弱以及难以捕捉细微情感特征的难题。\n\n该工具特别适合人工智能研究人员、语音算法开发者以及需要构建情感分析应用的技术团队使用。无论是学术研究还是工业级落地，emotion2vec 都能提供强大的特征提取能力。其核心亮点在于采用了先进的自监督学习范式，无需海量人工标注即可从大规模无标签语音数据中学习通用情感表示。项目不仅发布了基础的 emotion2vec 模型，还推出了经过数万小时数据训练的 emotion2vec+ 系列（包含 seed、base、large 版本），支持九类细粒度情感识别，在多项基准测试中展现了卓越性能。此外，emotion2vec 已深度集成至 FunASR 平台，并兼容 ModelScope 和 Hugging Face，方便用户根据网络环境灵活调用，极大地降低了开发与部署门槛。","\u003Cdiv align=\"center\">\n    \u003Ch1>\n    EMOTION2VEC\n    \u003C\u002Fh1>\n    \u003Cp>\n    Official PyTorch code for extracting features and training downstream models with \u003Cbr>\n    \u003Cb>\u003Cem>emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation\u003C\u002Fem>\u003C\u002Fb>\n    \u003C\u002Fp>\n    \u003Cp>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_e4f57ad89819.png\" alt=\"emotion2vec Logo\" style=\"width: 200px; height: 200px;\">\n    \u003C\u002Fp>\n    \u003Cp>\n    \u003C\u002Fp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-linux-lightgrey\" alt=\"version\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.8+-orange\" alt=\"version\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPyTorch-1.13+-brightgreen\" alt=\"python\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-red.svg\" alt=\"mit\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n# News\n- [Oct. 2024] 🔧 We update the usage in the FunASR interface with source selection. \"ms\" or \"modelscope\" for China mainland users; \"hf\" or \"huggingface\" for other overseas users. **We recommend using FunASR interface for a smooth landing.**\n- [Jun. 2024] 🔧 We fix a bug in emotion2vec+. Please re-pull the latest code. \n- [May. 2024] 🔥 Speech emotion recognition foundation model: **emotion2vec+**, with 9-class emotions has been released on [Model Scope](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_large\u002Fsummary) and [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Femotion2vec). Check out a series of emotion2vec+ (seed, base, large) models for SER with high performance **(We recommend this release instead of the Jan. 2024 release)**. \n- [Jan. 2024] 9-class emotion recognition model with iterative fine-tuning from emotion2vec has been released in [modelscope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base_finetuned\u002Fsummary) and [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec). \n- [Jan. 2024] **emotion2vec** has been integrated into [modelscope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base\u002Fsummary) and [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec).  \n- [Dec. 2023] We release the [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15185), and create a [WeChat group](.\u002Fsrc\u002FWechat.jpg) for emotion2vec. \n- [Nov. 2023] We release code, checkpoints, and extracted features for emotion2vec. \n\n# Model Card\nGitHub Repo: [emotion2vec](https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec)\n|Model|⭐Model Scope|🤗Hugging Face|Fine-tuning Data (Hours)|\n|:---:|:-------------:|:-----------:|:-------------:|\n|emotion2vec|[Link](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base\u002Fsummary)|[Link](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_base)|\u002F|\n|emotion2vec+ seed|[Link](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_seed\u002Fsummary)|[Link](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_seed)|201|\n|emotion2vec+ base|[Link](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_base\u002Fsummary)|[Link](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_base)|4788|\n|emotion2vec+ large|[Link](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_large\u002Fsummary)|[Link](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_large)|42526|\n\n# Overview\n\n- [emotion2vec+: speech emotion recognition foundation model](#emotion2vec-speech-emotion-recognition-foundation-model)\n  - [Guides](#guides)\n  - [Data Engineering](#data-engineering)\n  - [Performance](#performance)\n  - [Inference with checkpoints](#inference-with-checkpoints)\n    - [Install from FunASR](#install-from-funasr)\n- [emotion2vec: universal speech emotion representation model](#emotion2vec-universal-speech-emotion-representation-model)\n  - [Guides](#guides-1)\n  - [Performance](#performance-1)\n    - [Performance on IEMOCAP](#performance-on-iemocap)\n    - [Performance on other languages](#performance-on-other-languages)\n    - [Performance on other speech emotion tasks](#performance-on-other-speech-emotion-tasks)\n  - [Visualization](#visualization)\n  - [Extract features](#extract-features)\n    - [Download extracted features](#download-extracted-features)\n    - [Extract features from your dataset](#extract-features-from-your-dataset)\n      - [Install from the source code](#install-from-the-source-code)\n      - [Install from FunASR](#install-from-funasr-1)\n  - [Training your downstream model](#training-your-downstream-model)\n  - [Contributors](#contributors)\n  - [Citation](#citation)\n\n# emotion2vec+: speech emotion recognition foundation model\n\n## Guides\nemotion2vec+ is a series of foundational models for speech emotion recognition (SER). We aim to train a \"whisper\" in the field of speech emotion recognition, overcoming the effects of language and recording environments through data-driven methods to achieve universal, robust emotion recognition capabilities. The performance of emotion2vec+ significantly exceeds other highly downloaded open-source models on Hugging Face.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_6cc516ea94a2.png)\n\n## Data Engineering\nWe offer 3 versions of emotion2vec+, each derived from the data of its predecessor. If you need a model focusing on spech emotion representation, refer to [emotion2vec: universal speech emotion representation model](#emotion2vec-universal-speech-emotion-representation-model).\n\n- emotion2vec+ seed: Fine-tuned with academic speech emotion data from [EmoBox](https:\u002F\u002Fgithub.com\u002Femo-box\u002FEmoBox)\n- emotion2vec+ base: Fine-tuned with filtered large-scale pseudo-labeled data to obtain the base size model (~90M)\n- emotion2vec+ large: Fine-tuned with filtered large-scale pseudo-labeled data to obtain the large size model (~300M)\n\nThe iteration process is illustrated below, culminating in the training of the emotion2vec+ large model with 40k out of 160k hours of speech emotion data. Details of data engineering will be announced later. \n\n## Performance\n\nPerformance on [EmoBox](https:\u002F\u002Fgithub.com\u002Femo-box\u002FEmoBox) for 4-class primary emotions (without fine-tuning). Details of model performance will be announced later. \n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_c198b1a9bd3d.png)\n\n## Inference with checkpoints\n\n### Install from FunASR\n1. install funasr\n```bash\npip install -U funasr\n```\n\n2. run the code.\n```python\n'''\nUsing the finetuned emotion recognization model\n\nrec_result contains {'feats', 'labels', 'scores'}\n\textract_embedding=False: 9-class emotions with scores\n\textract_embedding=True: 9-class emotions with scores, along with features\n\n9-class emotions: \niic\u002Femotion2vec_plus_seed, iic\u002Femotion2vec_plus_base, iic\u002Femotion2vec_plus_large (May. 2024 release)\niic\u002Femotion2vec_base_finetuned (Jan. 2024 release)\n    0: angry\n    1: disgusted\n    2: fearful\n    3: happy\n    4: neutral\n    5: other\n    6: sad\n    7: surprised\n    8: unknown\n'''\n\nfrom funasr import AutoModel\n\n# model=\"iic\u002Femotion2vec_base\"\n# model=\"iic\u002Femotion2vec_base_finetuned\"\n# model=\"iic\u002Femotion2vec_plus_seed\"\n# model=\"iic\u002Femotion2vec_plus_base\"\nmodel_id = \"iic\u002Femotion2vec_plus_large\"\n\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\",  # \"ms\" or \"modelscope\" for China mainland users; \"hf\" or \"huggingface\" for other overseas users\n)\n\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\nrec_result = model.generate(wav_file, output_dir=\".\u002Foutputs\", granularity=\"utterance\", extract_embedding=False)\nprint(rec_result)\n```\nThe model will be downloaded automatically.\n\nFunASR support file list input in wav.scp (kaldi style):\n```\nwav_name1 wav_path1.wav\nwav_name2 wav_path2.wav\n...\n```\nRefer to [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec) for more details.\n\n\n# emotion2vec: universal speech emotion representation model\n\n## Guides\n\nemotion2vec is the first universal speech emotion representation model. Through self-supervised pre-training, emotion2vec has the ability to extract emotion representation across different tasks, languages, and scenarios.\n\n## Performance\n### Performance on IEMOCAP\nemotion2vec achieves SOTA with only linear layers on the mainstream IEMOCAP dataset. Refer to the paper for more details.\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_33eb982f8ad4.png)\n\n### Performance on other languages\nemotion2vec achieves SOTA compared with SOTA SSL models on multiple languages (Mandarin, French, German, Italian, etc.). Refer to the paper for more details.\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_5c9052573845.png)\n\n### Performance on other speech emotion tasks\nRefer to the paper for more details.\n\n## Visualization\nUMAP visualizations of learned features on the IEMOCAP dataset. \u003Cspan style=\"color:red;\">Red\u003C\u002Fspan> and \u003Cspan style=\"color:blue;\">Blue\u003C\u002Fspan> tones mean low and high arousal emotional classes, respectively.  Refer to the paper for more details. \n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_a9f557d29025.png)\n\n## Extract features\n### Download extracted features\nWe provide the extracted features of popular emotion dataset IEMOCAP. The features are extracted from the last layer of emotion2vec. The features are stored in `.npy` format and the sample rate of the extracted features is 50Hz. The utterance-level features are computed by averaging the frame-level features.\n- frame-level: [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1JdQzwDJJEdKZcqSC1TXETvFZ7VpUvLEX\u002Fview?usp=sharing) | [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1FtCwhUwhONaeEos4nLYFWw?pwd=zb3p) (password: zb3p)\n- utterance-level: [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jJVfoEKC8yjwj39F__8jIQayd5PBO0WD\u002Fview?usp=sharing) | [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1AsJHacD6a5h27YJiCSee4w?pwd=qu3u) (password: qu3u)\n\nAll wav files are extracted from the original dataset for diverse downstream tasks. If want to train with standard 5531 utterances for 4 emotions classification, please refer to the `iemocap_downstream` folder.\n\n### Extract features from your dataset\n#### Install from the source code\nThe minimum environment requirements are `python>=3.8` and `torch>=1.13`. Our testing environments are `python=3.8` and `torch=2.01`.\n1. git clone repos.\n```bash\npip install fairseq\ngit clone https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec.git\n```\n\n2. download emotion2vec checkpoint from:\n- [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F10L4CEoEyt6mQrqdblDgDSfZETYvA9c2T\u002Fview?usp=sharing)\n- [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F15zqmNTYa0mkEwlIom7DO3g?pwd=b9fq) (password: b9fq)\n- [modelscope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fdamo\u002Femotion2vec_base\u002Fsummary): `git clone https:\u002F\u002Fwww.modelscope.cn\u002Fdamo\u002Femotion2vec_base.git`\n\n3. modify and run `scripts\u002Fextract_features.sh`\n\n#### Install from FunASR\n1. install funasr\n```bash\npip install -U funasr\n```\n\n2. run the code.\n```python\n'''\nUsing the emotion representation model\nrec_result only contains {'feats'}\n\tgranularity=\"utterance\": {'feats': [*768]}\n\tgranularity=\"frame\": {feats: [T*768]}\n'''\n\nfrom funasr import AutoModel\n\nmodel_id = \"iic\u002Femotion2vec_base\"\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\",  # \"ms\" or \"modelscope\" for China mainland users; \"hf\" or \"huggingface\" for other overseas users\n)\n\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\nrec_result = model.generate(wav_file, output_dir=\".\u002Foutputs\", granularity=\"utterance\")\nprint(rec_result)\n```\nThe model will be downloaded automatically.\n\nFunASR support file list input in wav.scp (kaldi style):\n```\nwav_name1 wav_path1.wav\nwav_name2 wav_path2.wav\n...\n```\nRefer to [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec) for more details.\n\n## Training your downstream model\nWe provide training scripts for IEMOCAP dataset in the `iemocap_downstream` folder. You can modify the scripts to train your downstream model on other datasets.\n\n## Contributors\n|  Institution | Contribution |\n|:------|:-----|\n| [Shanghai Jiao Tong University](https:\u002F\u002Fwww.seiee.sjtu.edu.cn\u002F) | Researchers; Computing power; Data collection; |\n| [Fudan University](https:\u002F\u002Fistbi.fudan.edu.cn\u002F) | Researchers |\n| [The Chinese University of Hong Kong](https:\u002F\u002Fwww.cuhk.edu.hk\u002Fchinese\u002Findex.html) | Researchers |\n| [Alibaba Group](https:\u002F\u002Fwww.alibaba.com\u002F) | Researchers; Computing power; Data host; Model host; |\n| [Peng Cheng Laboratory](https:\u002F\u002Fdata-starcloud.pcl.ac.cn\u002F) | Researchers |\n\n## Citation\nIf you find our emotion2vec code and paper useful, please kindly cite:\n```\n@article{ma2023emotion2vec,\n  title={emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation},\n  author={Ma, Ziyang and Zheng, Zhisheng and Ye, Jiaxin and Li, Jinchao and Gao, Zhifu and Zhang, Shiliang and Chen, Xie},\n  journal={Proc. ACL 2024 Findings},\n  year={2024}\n}\n```\n","\u003Cdiv align=\"center\">\n    \u003Ch1>\n    EMOTION2VEC\n    \u003C\u002Fh1>\n    \u003Cp>\n    官方 PyTorch 代码，用于提取特征并使用 \u003Cbr>\n    \u003Cb>\u003Cem>emotion2vec：语音情感表示的自监督预训练\u003C\u002Fem>\u003C\u002Fb> 训练下游模型\n    \u003C\u002Fp>\n    \u003Cp>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_e4f57ad89819.png\" alt=\"emotion2vec Logo\" style=\"width: 200px; height: 200px;\">\n    \u003C\u002Fp>\n    \u003Cp>\n    \u003C\u002Fp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-linux-lightgrey\" alt=\"version\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.8+-orange\" alt=\"version\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPyTorch-1.13+-brightgreen\" alt=\"python\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-red.svg\" alt=\"mit\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n# 新闻\n- [2024年10月] 🔧 我们更新了 FunASR 接口中的使用方法，并增加了源选择功能。“ms”或“modelscope”适用于中国大陆用户；“hf”或“huggingface”适用于其他海外用户。**我们建议使用 FunASR 接口以获得更流畅的体验。**\n- [2024年6月] 🔧 我们修复了 emotion2vec+ 中的一个错误，请重新拉取最新代码。\n- [2024年5月] 🔥 语音情感识别基础模型：**emotion2vec+**，支持9类情感，已在 [Model Scope](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_large\u002Fsummary) 和 [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Femotion2vec) 上发布。请查看一系列高性能的 emotion2vec+（seed、base、large）模型，用于语音情感识别任务 **(我们推荐此次发布的版本，而非2024年1月发布的版本)**。\n- [2024年1月] 基于 emotion2vec 进行迭代微调的9类情感识别模型已在 [modelscope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base_finetuned\u002Fsummary) 和 [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec) 上发布。\n- [2024年1月] **emotion2vec** 已集成到 [modelscope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base\u002Fsummary) 和 [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec) 中。\n- [2023年12月] 我们发布了[论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15185)，并创建了一个[微信群](.\u002Fsrc\u002FWechat.jpg)用于讨论 emotion2vec。\n- [2023年11月] 我们发布了 emotion2vec 的代码、检查点以及提取的特征。\n\n# 模型卡片\nGitHub 仓库：[emotion2vec](https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec)\n|模型|⭐Model Scope|🤗Hugging Face|微调数据（小时）|\n|:---:|:-------------:|:-----------:|:-------------:|\n|emotion2vec|[链接](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_base\u002Fsummary)|[链接](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_base)|\u002F|\n|emotion2vec+ seed|[链接](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_seed\u002Fsummary)|[链接](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_seed)|201|\n|emotion2vec+ base|[链接](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_base\u002Fsummary)|[链接](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_base)|4788|\n|emotion2vec+ large|[链接](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002Fiic\u002Femotion2vec_plus_large\u002Fsummary)|[链接](https:\u002F\u002Fhuggingface.co\u002Femotion2vec\u002Femotion2vec_plus_large)|42526|\n\n# 概述\n\n- [emotion2vec+：语音情感识别基础模型](#emotion2vec-speech-emotion-recognition-foundation-model)\n  - [指南](#guides)\n  - [数据工程](#data-engineering)\n  - [性能](#performance)\n  - [使用检查点进行推理](#inference-with-checkpoints)\n    - [从 FunASR 安装](#install-from-funasr)\n- [emotion2vec：通用语音情感表示模型](#emotion2vec-universal-speech-emotion-representation-model)\n  - [指南](#guides-1)\n  - [性能](#performance-1)\n    - [在 IEMOCAP 数据集上的表现](#performance-on-iemocap)\n    - [在其他语言上的表现](#performance-on-other-languages)\n    - [在其他语音情感任务上的表现](#performance-on-other-speech-emotion-tasks)\n  - [可视化](#visualization)\n  - [提取特征](#extract-features)\n    - [下载提取的特征](#download-extracted-features)\n    - [从您的数据集提取特征](#extract-features-from-your-dataset)\n      - [从源代码安装](#install-from-the-source-code)\n      - [从 FunASR 安装](#install-from-funasr-1)\n  - [训练您的下游模型](#training-your-downstream-model)\n  - [贡献者](#contributors)\n  - [引用](#citation)\n\n# emotion2vec+：语音情感识别基础模型\n\n## 指南\nemotion2vec+ 是一系列用于语音情感识别（SER）的基础模型。我们的目标是在语音情感识别领域打造一个“whisper”，通过数据驱动的方法克服语言和录音环境的影响，从而实现通用且鲁棒的情感识别能力。emotion2vec+ 的性能显著优于 Hugging Face 上其他高下载量的开源模型。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_6cc516ea94a2.png)\n\n## 数据工程\n我们提供了3个版本的 emotion2vec+，每个版本都基于其前一代的数据衍生而来。如果您需要专注于语音情感表示的模型，请参阅 [emotion2vec：通用语音情感表示模型](#emotion2vec-universal-speech-emotion-representation-model)。\n\n- emotion2vec+ seed：基于 [EmoBox](https:\u002F\u002Fgithub.com\u002Femo-box\u002FEmoBox) 的学术语音情感数据进行微调。\n- emotion2vec+ base：通过过滤大规模伪标签数据得到基础尺寸模型（约90M参数）。\n- emotion2vec+ large：通过过滤大规模伪标签数据得到大型尺寸模型（约300M参数）。\n\n迭代过程如下所示，最终使用16万小时语音情感数据中的4万小时训练了 emotion2vec+ large 模型。数据工程的详细信息将在稍后公布。\n\n## 性能\n\n在 [EmoBox](https:\u002F\u002Fgithub.com\u002Femo-box\u002FEmoBox) 数据集上对4类主要情感的表现（未进行微调）。模型性能的详细信息将在稍后公布。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_c198b1a9bd3d.png)\n\n## 使用检查点进行推理\n\n### 从 FunASR 安装\n1. 安装 funasr\n```bash\npip install -U funasr\n```\n\n2. 运行代码。\n```python\n'''\n使用微调后的情感识别模型\n\nrec_result 包含 {'feats', 'labels', 'scores'}\n\textract_embedding=False：9类情感及得分\n\textract_embedding=True：9类情感及得分，同时包含特征\n\n9类情感：\niic\u002Femotion2vec_plus_seed、iic\u002Femotion2vec_plus_base、iic\u002Femotion2vec_plus_large（2024年5月发布）\niic\u002Femotion2vec_base_finetuned（2024年1月发布）\n    0：愤怒\n    1：厌恶\n    2：恐惧\n    3：快乐\n    4： neutral\n    5：其他\n    6：悲伤\n    7：惊讶\n    8：未知\n'''\n\nfrom funasr import AutoModel\n\n# model=\"iic\u002Femotion2vec_base\"\n# model=\"iic\u002Femotion2vec_base_finetuned\"\n# model=\"iic\u002Femotion2vec_plus_seed\"\n\n# 模型=\"iic\u002Femotion2vec_plus_base\"\nmodel_id = \"iic\u002Femotion2vec_plus_large\"\n\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\",  # 对于中国大陆用户，使用 \"ms\" 或 \"modelscope\"；对于其他海外用户，使用 \"hf\" 或 \"huggingface\"\n)\n\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\nrec_result = model.generate(wav_file, output_dir=\".\u002Foutputs\", granularity=\"utterance\", extract_embedding=False)\nprint(rec_result)\n```\n模型将自动下载。\n\nFunASR 支持以 kaldi 样式的 wav.scp 文件作为输入：\n```\nwav_name1 wav_path1.wav\nwav_name2 wav_path2.wav\n...\n```\n更多详情请参阅 [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec)。\n\n\n# emotion2vec：通用语音情感表示模型\n\n## 使用指南\n\nemotion2vec 是首个通用的语音情感表示模型。通过自监督预训练，emotion2vec 能够在不同任务、语言和场景中提取情感表示。\n\n## 性能表现\n### IEMOCAP 数据集上的表现\n在主流的 IEMOCAP 数据集上，emotion2vec 仅使用线性层即达到了 SOTA 水平。更多细节请参阅论文。\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_33eb982f8ad4.png)\n\n### 其他语言上的表现\n与多个语言（普通话、法语、德语、意大利语等）中的 SOTA SSL 模型相比，emotion2vec 同样达到了 SOTA 水平。更多细节请参阅论文。\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_5c9052573845.png)\n\n### 其他语音情感任务上的表现\n更多细节请参阅论文。\n\n## 可视化\nIEMOCAP 数据集上学习到的特征的 UMAP 可视化结果。\u003Cspan style=\"color:red;\">红色\u003C\u002Fspan>和\u003Cspan style=\"color:blue;\">蓝色\u003C\u002Fspan>分别代表低唤醒度和高唤醒度的情感类别。更多细节请参阅论文。\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_readme_a9f557d29025.png)\n\n## 提取特征\n### 下载已提取的特征\n我们提供了流行情感数据集 IEMOCAP 的已提取特征。这些特征是从 emotion2vec 的最后一层提取的，存储为 `.npy` 格式，采样率为 50Hz。话语级别的特征是通过对帧级别特征进行平均计算得到的。\n- 帧级别：[Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1JdQzwDJJEdKZcqSC1TXETvFZ7VpUvLEX\u002Fview?usp=sharing) | [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1FtCwhUwhONaeEos4nLYFWw?pwd=zb3p)（密码：zb3p）\n- 话语级别：[Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jJVfoEKC8yjwj39F__8jIQayd5PBO0WD\u002Fview?usp=sharing) | [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1AsJHacD6a5h27YJiCSee4w?pwd=qu3u)（密码：qu3u）\n\n所有 wav 文件均来自原始数据集，适用于多种下游任务。若希望使用标准的 5531 句话语进行四类情感分类的训练，请参考 `iemocap_downstream` 文件夹。\n\n### 从您的数据集提取特征\n#### 从源代码安装\n最低环境要求为 `python>=3.8` 和 `torch>=1.13`。我们的测试环境为 `python=3.8` 和 `torch=2.01`。\n1. 克隆仓库。\n```bash\npip install fairseq\ngit clone https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec.git\n```\n\n2. 从以下来源下载 emotion2vec 检查点：\n- [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F10L4CEoEyt6mQrqdblDgDSfZETYvA9c2T\u002Fview?usp=sharing)\n- [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F15zqmNTYa0mkEwlIom7DO3g?pwd=b9fq)（密码：b9fq）\n- [ModelScope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fdamo\u002Femotion2vec_base\u002Fsummary)：`git clone https:\u002F\u002Fwww.modelscope.cn\u002Fdamo\u002Femotion2vec_base.git`\n\n3. 修改并运行 `scripts\u002Fextract_features.sh`。\n\n#### 通过 FunASR 安装\n1. 安装 FunASR\n```bash\npip install -U funasr\n```\n\n2. 运行代码。\n```python\n'''\n使用情感表示模型\nrec_result 仅包含 {'feats'}\n\tgranularity=\"utterance\": {'feats': [*768]}\n\tgranularity=\"frame\": {feats: [T*768]}\n'''\n\nfrom funasr import AutoModel\n\nmodel_id = \"iic\u002Femotion2vec_base\"\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\",  # 对于中国大陆用户，使用 \"ms\" 或 \"modelscope\"；对于其他海外用户，使用 \"hf\" 或 \"huggingface\"\n)\n\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\nrec_result = model.generate(wav_file, output_dir=\".\u002Foutputs\", granularity=\"utterance\")\nprint(rec_result)\n```\n模型将自动下载。\n\nFunASR 支持以 kaldi 样式的 wav.scp 文件作为输入：\n```\nwav_name1 wav_path1.wav\nwav_name2 wav_path2.wav\n...\n```\n更多详情请参阅 [FunASR](https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FFunASR\u002Ftree\u002Fmain\u002Fexamples\u002Findustrial_data_pretraining\u002Femotion2vec)。\n\n## 训练您的下游模型\n我们在 `iemocap_downstream` 文件夹中提供了针对 IEMOCAP 数据集的训练脚本。您可以修改这些脚本，以在其他数据集上训练您的下游模型。\n\n## 贡献者\n| 机构 | 贡献 |\n|:------|:-----|\n| [上海交通大学](https:\u002F\u002Fwww.seiee.sjtu.edu.cn\u002F) | 研究人员；计算资源；数据收集； |\n| [复旦大学](https:\u002F\u002Fistbi.fudan.edu.cn\u002F) | 研究人员 |\n| [香港中文大学](https:\u002F\u002Fwww.cuhk.edu.hk\u002Fchinese\u002Findex.html) | 研究人员 |\n| [阿里巴巴集团](https:\u002F\u002Fwww.alibaba.com\u002F) | 研究人员；计算资源；数据托管；模型托管； |\n| [鹏城实验室](https:\u002F\u002Fdata-starcloud.pcl.ac.cn\u002F) | 研究人员 |\n\n## 引用\n如果您认为我们的 emotion2vec 代码和论文有用，请引用：\n```\n@article{ma2023emotion2vec,\n  title={emotion2vec: 自监督预训练用于语音情感表示},\n  author={Ma, Ziyang and Zheng, Zhisheng and Ye, Jiaxin and Li, Jinchao and Gao, Zhifu and Zhang, Shiliang and Chen, Xie},\n  journal={Proc. ACL 2024 Findings},\n  year={2024}\n}\n```","# emotion2vec 快速上手指南\n\nemotion2vec 是一个用于语音情感表示的自监督预训练模型系列，包含通用的情感特征提取模型（emotion2vec）和高性能的语音情感识别基础模型（emotion2vec+）。本指南将帮助您快速在中国大陆环境下部署和使用该工具。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux\n*   **Python**: 3.8 或更高版本\n*   **PyTorch**: 1.13 或更高版本\n*   **依赖库**: `fairseq` (仅源码安装时需要)\n\n## 安装步骤\n\n为了获得最流畅的体验并自动处理模型下载，**强烈推荐使用 FunASR 接口进行安装**。FunASR 已集成 emotion2vec 并支持国内镜像源加速。\n\n### 方法一：通过 FunASR 安装（推荐）\n\n只需一条命令即可安装最新版的 FunASR，它会自动处理依赖和模型加载逻辑：\n\n```bash\npip install -U funasr\n```\n\n### 方法二：从源码安装（高级用户）\n\n如果您需要修改底层代码或进行特定的特征提取实验，可以选择从源码安装：\n\n1.  安装 `fairseq` 依赖：\n    ```bash\n    pip install fairseq\n    ```\n2.  克隆仓库：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec.git\n    ```\n3.  手动下载模型检查点（Checkpoint）：\n    *   **百度网盘**: [下载链接](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F15zqmNTYa0mkEwlIom7DO3g?pwd=b9fq) (提取码: `b9fq`)\n    *   **ModelScope**: `git clone https:\u002F\u002Fwww.modelscope.cn\u002Fdamo\u002Femotion2vec_base.git`\n\n## 基本使用\n\n以下示例展示如何使用 Python 调用预训练模型进行推理。代码会自动根据网络环境选择模型源。\n\n### 场景 1：语音情感识别 (使用 emotion2vec+)\n\n此场景适用于直接获取音频的情感分类结果（如：愤怒、高兴、悲伤等 9 类情感）。\n\n```python\nfrom funasr import AutoModel\n\n# 选择模型：推荐使用 large 版本以获得最佳效果\n# 可选模型：iic\u002Femotion2vec_plus_seed, iic\u002Femotion2vec_plus_base, iic\u002Femotion2vec_plus_large\nmodel_id = \"iic\u002Femotion2vec_plus_large\"\n\n# 初始化模型\n# hub=\"ms\" 代表使用 ModelScope (适合中国大陆用户)\n# hub=\"hf\" 代表使用 HuggingFace (适合海外用户)\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\", \n)\n\n# 准备测试音频路径\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\n\n# 执行推理\n# extract_embedding=False: 仅返回情感标签和分数\n# extract_embedding=True: 同时返回情感标签、分数和情感特征向量\nrec_result = model.generate(\n    wav_file, \n    output_dir=\".\u002Foutputs\", \n    granularity=\"utterance\", \n    extract_embedding=False\n)\n\nprint(rec_result)\n```\n\n**输出说明**：\n返回结果包含 `feats` (特征), `labels` (标签), `scores` (置信度)。\n情感标签对应关系 (0-8):\n0: angry (愤怒), 1: disgusted (厌恶), 2: fearful (恐惧), 3: happy (高兴), 4: neutral (中性), 5: other (其他), 6: sad (悲伤), 7: surprised (惊讶), 8: unknown (未知)。\n\n### 场景 2：提取情感特征向量 (使用 emotion2vec)\n\n此场景适用于提取音频的情感嵌入向量（Embedding），用于下游任务（如聚类、自定义分类器训练等）。\n\n```python\nfrom funasr import AutoModel\n\n# 选择基础特征提取模型\nmodel_id = \"iic\u002Femotion2vec_base\"\n\nmodel = AutoModel(\n    model=model_id,\n    hub=\"ms\",  # 中国大陆用户请使用 \"ms\"\n)\n\nwav_file = f\"{model.model_path}\u002Fexample\u002Ftest.wav\"\n\n# 执行特征提取\n# granularity=\"utterance\": 返回整句音频的平均特征向量 (维度 768)\n# granularity=\"frame\": 返回帧级特征向量 (维度 T*768)\nrec_result = model.generate(\n    wav_file, \n    output_dir=\".\u002Foutputs\", \n    granularity=\"utterance\"\n)\n\nprint(rec_result)\n```\n\n**输出说明**：\n返回结果仅包含 `feats`。\n*   若 `granularity=\"utterance\"`，输出形状为 `[768]`。\n*   若 `granularity=\"frame\"`，输出形状为 `[T, 768]`，其中 T 为帧数。\n\n> **提示**：FunASR 同样支持批量处理，您可以准备一个 `wav.scp` 文件（Kaldi 风格），每行格式为 `wav_name wav_path`，即可一次性处理多个音频文件。","某智能客服团队正在构建一套能精准识别用户情绪（如愤怒、焦虑、满意）的语音分析系统，以实时辅助人工坐席或优化自动回复策略。\n\n### 没有 emotion2vec 时\n- **数据依赖严重**：团队需收集并标注数万条特定业务场景的语音数据才能训练出可用的模型，耗时数月且标注成本极高。\n- **跨语言\u002F场景泛化差**：在会议室安静环境下训练的模型，一旦应用到嘈杂的呼叫中心或面对不同口音的用户，识别准确率断崖式下跌。\n- **细粒度情感缺失**：传统模型往往只能区分“正\u002F负”向，难以精准捕捉“愤怒”、“失望”或“急切”等 9 类细微情感差异，导致服务策略粗糙。\n- **冷启动困难**：对于新开通的小语种业务线，因缺乏足够标注数据，根本无法部署有效的情感监控功能。\n\n### 使用 emotion2vec 后\n- **小样本快速落地**：利用 emotion2vec 强大的自监督预训练特征，仅需少量标注数据（甚至几百条）进行微调，即可在几天内完成高精度模型部署。\n- **鲁棒性显著提升**：得益于在数万小时多场景数据上的预训练，emotion2vec 能轻松应对背景噪音、不同语速及口音，保持稳定的识别性能。\n- **精细化情感洞察**：直接调用 emotion2vec+ 大模型，可精准输出 9 类具体情绪状态，帮助系统针对“愤怒”用户优先转接高级坐席，实现差异化服务。\n- **零样本跨语言迁移**：凭借通用的语音情感表征能力，emotion2vec 能将中文场景学到的情感逻辑快速迁移至小语种业务，大幅降低新市场拓展门槛。\n\nemotion2vec 通过自监督预训练技术，将语音情感识别从“劳动密集型”的数据标注困境中解放出来，实现了低成本、高精度且具备强泛化能力的工业化落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FddlBoJack_emotion2vec_a9f557d2.png","ddlBoJack","Ziyang Ma","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FddlBoJack_d8e5e797.jpg","Ph.D.ing | Research Intern @QwenLM | Prev: @ByteDance-Seed @alibaba-damo-academy @microsoft @megvii-research",null,"ziyang.tech","https:\u002F\u002Fgithub.com\u002FddlBoJack",[83,87,91],{"name":84,"color":85,"percentage":86},"Python","#3572A5",96.1,{"name":88,"color":89,"percentage":90},"Shell","#89e051",2.3,{"name":92,"color":93,"percentage":94},"Jupyter Notebook","#DA5B0B",1.6,1089,84,"2026-04-01T13:39:53","Linux","未说明（基于 PyTorch，通常建议使用支持 CUDA 的 NVIDIA GPU 以加速推理和训练，具体显存需求取决于模型大小：base 约 90M 参数，large 约 300M 参数）","未说明",{"notes":102,"python":103,"dependencies":104},"官方徽章明确标注平台为 Linux。提供两种安装方式：从源码安装（需手动下载检查点）或通过 FunASR 接口安装（推荐，可自动下载模型）。中国大陆用户建议使用 ModelScope ('ms') 作为模型源，海外用户使用 HuggingFace ('hf')。主要模型版本包括 emotion2vec_base 以及 emotion2vec+ 系列 (seed, base, large)。","3.8+",[105,106,107],"torch>=1.13","fairseq","funasr",[13,52,55],[110,111,112,113],"iemocap","pytorch-implementation","speech-emotion-recognition","speech-representation","2026-03-27T02:49:30.150509","2026-04-06T09:44:29.243734",[117,122,127,132,137,142],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},15508,"如何使用预训练的 emotion2vec 模型进行推理和情绪分类？","对于微调后的模型（fine-tuned checkpoint），建议直接使用 FunASR 管道进行推理，而不是使用原始的 fairseq 代码。示例代码如下：\nfrom funasr import AutoModel\nmodel = AutoModel(model=\".\u002Femotion2vec_base\")\nres = model(input=\".\u002Fexample\u002Ftest.wav\", output_dir=\".\u002Foutputs\")\nprint(res)\n如果是提取特征，可以使用提供的脚本；如果是直接进行情绪识别，请使用 FunASR pipeline。","https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\u002Fissues\u002F9",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},15509,"加载 data2vec2 或 emotion2vec 模型时出现 'KeyError: _name' 或 'AttributeError: NoneType object has no attribute task' 错误怎么办？","这通常是因为 fairseq 环境配置问题。请尝试以下步骤：\n1. 使用可编辑模式安装 fairseq：pip install -e .\n2. 导出 fairseq 的 python 路径。\n3. 在命令行中使用 user_dir 参数指定目录。\n注意：如果使用的是微调后的检查点（fine-tuned checkpoint），请不要使用 extract_features.py 脚本加载，而应使用 FunASR pipeline 进行推理，因为该脚本仅适用于提取预训练模型的特征。","https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\u002Fissues\u002F29",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},15510,"emotion2vec 模型处理音频片段的最佳长度是多少？长音频会导致显存溢出吗？","不需要手动分割音频为固定长度。emotion2vec 模型（包括 emotion2vec_plus_large）可以直接接受可变长度的音频片段输入，模型本身就是在可变长度数据上训练的。您可以直接将不同长度的片段（即使长达 200 秒）喂给模型，它会自动处理。如果遇到 CUDA OOM（显存溢出），那是硬件限制问题，而非模型输入长度限制，此时可根据显存情况适当切分，但模型本身无固定最佳长度限制。","https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\u002Fissues\u002F30",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},15511,"使用 IEMOCAP 数据集进行情绪识别时效果较差（WA 约 60%），可能的原因是什么？","IEMOCAP 数据集有不同的设置方式。主流且论文中报告的设置是使用标准的 4 类情绪分类，包含 5531 个话语（utterances）。请确保您使用的是这个特定的子集和设置。您可以使用项目中提供的预处理特征（位于 iemocap_downstream 目录），或者使用 emotion2vec 自行提取这 5531 个话语的特征。如果使用了整个数据集或其他划分方式，可能会导致结果与论文不符。","https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\u002Fissues\u002F33",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},15512,"为什么使用 emotion2vec_plus 模型推理时只得到 5 种情绪类别，而不是官方描述的 9 种？","这是因为默认加载的不是最新版本的模型。在使用 pipeline 函数时，必须将 model_revision 参数设置为 \"master\" 以加载最新的模型权重。修正后的代码如下：\ninference_pipeline = pipeline(\n    task=Tasks.emotion_recognition,\n    model=\"iic\u002Femotion2vec_plus_large\",\n    model_revision=\"master\"\n)\n添加该参数后即可正常识别 9 种情绪类别。","https:\u002F\u002Fgithub.com\u002FddlBoJack\u002Femotion2vec\u002Fissues\u002F45",{"id":143,"question_zh":144,"answer_zh":145,"source_url":121},15513,"train.lengths 文件中的数字代表什么含义？为什么不同音频提取的特征向量数量不同？","train.lengths 文件中的数字表示每个音频样本生成的特征向量数量。例如，第一个数字 97 表示第一个音频生成了 97 个 768 维的特征向量，第二个数字 68 表示第二个音频生成了 68 个。不同音频生成的特征向量数量不同是正常的，因为这取决于原始音频的时长。上游模型会根据音频长度输出相应数量的帧级特征，时长越长，特征向量越多。",[]]