{"id":13724154,"url":"https://github.com/QwenLM/Qwen2-Audio","last_synced_at":"2025-05-07T17:33:21.429Z","repository":{"id":248632972,"uuid":"819246014","full_name":"QwenLM/Qwen2-Audio","owner":"QwenLM","description":"The official repo of Qwen2-Audio chat \u0026 pretrained large audio language model proposed by Alibaba Cloud.","archived":false,"fork":false,"pushed_at":"2024-08-13T04:02:17.000Z","size":2211,"stargazers_count":1201,"open_issues_count":69,"forks_count":80,"subscribers_count":31,"default_branch":"main","last_synced_at":"2024-11-09T18:27:03.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QwenLM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-24T06:11:27.000Z","updated_at":"2024-11-08T02:14:07.000Z","dependencies_parsed_at":"2024-07-22T09:06:23.332Z","dependency_job_id":"52a91abb-d4a7-498d-9362-36f27ba3c9d2","html_url":"https://github.com/QwenLM/Qwen2-Audio","commit_stats":null,"previous_names":["qwenlm/qwen2-audio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QwenLM%2FQwen2-Audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QwenLM%2FQwen2-Audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QwenLM%2FQwen2-Audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QwenLM%2FQwen2-Audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QwenLM","download_url":"https://codeload.github.com/QwenLM/Qwen2-Audio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224628414,"owners_count":17343337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:51.225Z","updated_at":"2025-05-07T17:33:21.411Z","avatar_url":"https://github.com/QwenLM.png","language":"Python","funding_links":[],"categories":["\u003cspan id=\"audio\"\u003eAudio\u003c/span\u003e","语音识别与合成_其他","End-to-End Speech Models | 端到端语音模型","Open-source Large Speech/Audio Models\u003ca id=\"model\"\u003e\u003c/a\u003e","Python"],"sub_categories":["\u003cspan id=\"tool\"\u003eLLM (LLM \u0026 Tool)\u003c/span\u003e","网络服务_其他","Audio Understanding Models | 语音理解模型 (audio-in, text-out)","Others\u003ca id=\"paper11\"\u003e\u003c/a\u003e"],"readme":"\u003cp align=\"left\"\u003e\n        \u003ca href=\"README_CN.md\"\u003e中文\u003c/a\u003e \u0026nbsp｜ \u0026nbsp English\u0026nbsp\u0026nbsp\n\u003c/p\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://qianwen-res.oss-cn-beijing.aliyuncs.com/assets/blog/qwenaudio/qwen2audio_logo.png\" width=\"400\"/\u003e\n\u003cp\u003e\n\n\u003cp align=\"center\"\u003e\nQwen2-Audio-7B \u003ca href=\"https://modelscope.cn/models/qwen/Qwen2-Audio-7B\"\u003e🤖 \u003c/a\u003e | \u003ca href=\"https://huggingface.co/Qwen/Qwen2-Audio-7B\"\u003e🤗\u003c/a\u003e\u0026nbsp ｜ Qwen-Audio-7B-Instruct \u003ca href=\"https://modelscope.cn/models/qwen/Qwen2-Audio-7B-Instruct\"\u003e🤖 \u003c/a\u003e| \u003ca href=\"https://huggingface.co/Qwen/Qwen2-Audio-7B-Instruct\"\u003e🤗\u003c/a\u003e\u0026nbsp ｜ Demo\u003ca href=\"https://modelscope.cn/studios/qwen/Qwen2-Audio-Instruct-Demo\"\u003e 🤖\u003c/a\u003e | \u003ca href=\"https://huggingface.co/spaces/Qwen/Qwen2-Audio-Instruct-Demo\"\u003e🤗\u003c/a\u003e\u0026nbsp\n\u003cbr\u003e\n📑 \u003ca href=\"https://arxiv.org/abs/2407.10759\"\u003ePaper\u003c/a\u003e \u0026nbsp\u0026nbsp | \u0026nbsp\u0026nbsp 📑 \u003ca href=\"https://qwenlm.github.io/blog/qwen2-audio\"\u003eBlog\u003c/a\u003e \u0026nbsp\u0026nbsp | \u0026nbsp\u0026nbsp 💬 \u003ca href=\"https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png\"\u003eWeChat (微信)\u003c/a\u003e\u0026nbsp\u0026nbsp | \u0026nbsp\u0026nbsp \u003ca href=\"https://discord.gg/CV4E9rpNSD\"\u003eDiscord\u003c/a\u003e\u0026nbsp\u0026nbsp\n\u003c/p\u003e\n\n\nWe introduce the latest progress of Qwen-Audio, a large-scale audio-language model called Qwen2-Audio, which is capable of accepting various audio signal inputs and performing audio analysis or direct textual responses with regard to speech instructions. We introduce two distinct audio interaction modes:\n\n* voice chat: users can freely engage in voice interactions with Qwen2-Audio without text input;\n* audio analysis: users could provide audio and text instructions for analysis during the interaction;\n\n**We've released two models of the Qwen2-Audio series: Qwen2-Audio-7B and Qwen2-Audio-7B-Instruct.**\n\n## Architecture\n\nThe overview of three-stage training process of Qwen2-Audio.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/framework.png\" width=\"80%\"/\u003e\n\u003cp\u003e\n\n## News and Updates\n* 2024.8.9 🎉 We released the checkpoints of both `Qwen2-Audio-7B` and `Qwen2-Audio-7B-Instruct` on ModelScope and Hugging Face.\n* 2024.7.15 🎉 We released the paper of **Qwen2-Audio**, introducing the relevant model structure, training methods, and model performance. Check our [report](https://arxiv.org/abs/2407.10759) for details!\n* 2023.11.30 🔥  We released the **Qwen-Audio** series.\n\n\u003cbr\u003e\n\n## Evaluation\nWe evaluated the Qwen2-Audio's abilities on 13 standard benchmarks as follows:\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003eTask\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003cth\u003eDataset\u003c/th\u003e\u003cth\u003eSplit\u003c/th\u003e\u003cth\u003eMetric\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003eASR\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eAutomatic Speech Recognition\u003c/td\u003e\u003ctd\u003eFleurs\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eWER\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eAishell2\u003c/td\u003e\u003ctd\u003etest\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eLibrispeech\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eCommon Voice\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eS2TT\u003c/td\u003e\u003ctd\u003eSpeech-to-Text Translation\u003c/td\u003e\u003ctd\u003eCoVoST2\u003c/td\u003e\u003ctd\u003etest\u003c/td\u003e\u003ctd\u003eBLEU \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSER\u003c/td\u003e\u003ctd\u003eSpeech Emotion Recognition\u003c/td\u003e\u003ctd\u003eMeld\u003c/td\u003e\u003ctd\u003etest\u003c/td\u003e\u003ctd\u003eACC\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eVSC\u003c/td\u003e\u003ctd\u003eVocal Sound Classification\u003c/td\u003e\u003ctd\u003eVocalSound\u003c/td\u003e\u003ctd\u003etest\u003c/td\u003e\u003ctd\u003eACC\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003e\u003ca href=\"https://github.com/OFA-Sys/AIR-Bench\"\u003eAIR-Bench\u003c/a\u003e\u003cbr\u003e\u003c/td\u003e\u003ctd\u003eChat-Benchmark-Speech\u003c/td\u003e\u003ctd\u003eFisher\u003cbr\u003eSpokenWOZ\u003cbr\u003eIEMOCAP\u003cbr\u003eCommon voice\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003ctd\u003eGPT-4 Eval\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eChat-Benchmark-Sound\u003c/td\u003e\u003ctd\u003eClotho\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003ctd\u003eGPT-4 Eval\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eChat-Benchmark-Music\u003c/td\u003e\u003ctd\u003eMusicCaps\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003ctd\u003eGPT-4 Eval\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eChat-Benchmark-Mixed-Audio\u003c/td\u003e\u003ctd\u003eCommon voice\u003cbr\u003eAudioCaps\u003cbr\u003eMusicCaps\u003c/td\u003e\u003ctd\u003edev | test\u003c/td\u003e\u003ctd\u003eGPT-4 Eval\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n\nThe below is the overal performance:\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/radar_compare_qwen_audio.png\" width=\"70%\"/\u003e\n\u003cp\u003e\n\nThe details of evaluation are as follows:\n\u003cbr\u003e\n\u003cb\u003e(Note: The evaluation results we present are based on the initial model of the original training framework. However, the scores showed some fluctuations after converting the framework to Huggingface. Here, we present our complete evaluation results, starting with the initial model results from the paper.)\u003c/b\u003e\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth rowspan=\"2\"\u003eTask\u003c/th\u003e\u003cth rowspan=\"2\"\u003eDataset\u003c/th\u003e\u003cth rowspan=\"2\"\u003eModel\u003c/th\u003e\u003cth colspan=\"2\"\u003ePerformance\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth\u003eMetrics\u003c/th\u003e\u003cth\u003eResults\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd rowspan=\"15\"\u003eASR\u003c/td\u003e\u003ctd rowspan=\"7\"\u003e\u003cb\u003eLibrispeech\u003c/b\u003e\u003cbr\u003edev-clean | dev-other | \u003cbr\u003etest-clean | test-other\u003c/td\u003e\u003ctd\u003eSpeechT5\u003c/td\u003e\u003ctd rowspan=\"7\"\u003eWER \u003c/td\u003e\u003ctd\u003e2.1 | 5.5 | 2.4 | 5.8\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechNet\u003c/td\u003e\u003ctd\u003e- | - | 30.7 | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSLM-FT\u003c/td\u003e\u003ctd\u003e- | - | 2.6 | 5.0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSALMONN\u003c/td\u003e\u003ctd\u003e- | - | 2.1 | 4.9\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechVerse\u003c/td\u003e\u003ctd\u003e- | - | 2.1 | 4.4\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e1.8 | 4.0 | 2.0 | 4.2\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e1.3 | 3.4 | 1.6 | 3.6\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"2\"\u003e\u003cb\u003eCommon Voice 15\u003c/b\u003e \u003cbr\u003een | zh | yue | fr\u003c/td\u003e\u003ctd\u003eWhisper-large-v3\u003c/td\u003e\u003ctd rowspan=\"2\"\u003eWER \u003c/td\u003e\u003ctd\u003e9.3 | 12.8 | 10.9 | 10.8\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e8.6 | 6.9 | 5.9 | 9.6\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd rowspan=\"2\"\u003e\u003cb\u003eFleurs\u003c/b\u003e \u003cbr\u003ezh\u003c/td\u003e\u003ctd\u003eWhisper-large-v3\u003c/td\u003e\u003ctd rowspan=\"2\"\u003eWER \u003c/td\u003e\u003ctd\u003e7.7\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e7.5\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003e\u003cb\u003eAishell2\u003c/b\u003e \u003cbr\u003eMic | iOS | Android\u003c/td\u003e\u003ctd\u003eMMSpeech-base\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eWER \u003c/td\u003e\u003ctd\u003e4.5 | 3.9 | 4.0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eParaformer-large\u003c/td\u003e\u003ctd\u003e- | \u003cb\u003e2.9\u003c/b\u003e | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e3.3 | 3.1 | 3.3\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e3.0\u003c/b\u003e | 3.0 | \u003cb\u003e2.9\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"8\"\u003eS2TT\u003c/td\u003e\u003ctd rowspan=\"5\"\u003e\u003cb\u003eCoVoST2\u003c/b\u003e \u003cbr\u003een-de | de-en | \u003cbr\u003een-zh | zh-en\u003c/td\u003e\u003ctd\u003eSALMONN\u003c/td\u003e\u003ctd rowspan=\"5\"\u003eBLEU \u003c/td\u003e\u003ctd\u003e18.6 | - | 33.1 | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechLLaMA\u003c/td\u003e\u003ctd\u003e- | 27.1 | - | 12.3\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eBLSP\u003c/td\u003e\u003ctd\u003e14.1 | - | - | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e25.1 | 33.9 | 41.5 | 15.7\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e29.9 | 35.2 | 45.2 | 24.4\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd rowspan=\"3\"\u003e\u003cb\u003eCoVoST2\u003c/b\u003e \u003cbr\u003ees-en | fr-en | it-en |\u003c/td\u003e\u003ctd\u003eSpeechLLaMA\u003c/td\u003e\u003ctd rowspan=\"3\"\u003eBLEU \u003c/td\u003e\u003ctd\u003e27.9 | 25.2 | 25.9\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e39.7 | \u003cb\u003e38.5\u003c/b\u003e | 36.0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e40.0 | 38.5 | 36.3\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"3\"\u003eSER\u003c/td\u003e\u003ctd rowspan=\"3\"\u003e\u003cb\u003eMeld\u003c/b\u003e\u003c/td\u003e\u003ctd\u003eWavLM-large\u003c/td\u003e\u003ctd rowspan=\"3\"\u003eACC \u003c/td\u003e\u003ctd\u003e0.542\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e0.557\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e0.553\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003eVSC\u003c/td\u003e\u003ctd rowspan=\"4\"\u003e\u003cb\u003eVocalSound\u003c/b\u003e\u003c/td\u003e\u003ctd\u003eCLAP\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eACC \u003c/td\u003e\u003ctd\u003e0.4945\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003ePengi\u003c/td\u003e\u003ctd\u003e0.6035\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e0.9289\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e0.9392\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eAIR-Bench \u003cbr\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eChat Benchmark\u003c/b\u003e\u003cbr\u003eSpeech | Sound |\u003cbr\u003e Music | Mixed-Audio\u003c/td\u003e\u003ctd\u003eSALMONN\u003cbr\u003eBLSP\u003cbr\u003ePandagpt\u003cbr\u003eMacaw-LLM\u003cbr\u003eSpeechGPT\u003cbr\u003eNext-gpt\u003cbr\u003eQwen-Audio\u003cbr\u003eGemini-1.5-pro\u003cbr\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003eGPT-4 \u003c/td\u003e\u003ctd\u003e6.16 | 6.28 | 5.95 | 6.08\u003cbr\u003e6.17 | 5.55 | 5.08 | 5.33\u003cbr\u003e3.58 | 5.46 | 5.06 | 4.25\u003cbr\u003e0.97 | 1.01 | 0.91 | 1.01\u003cbr\u003e1.57 | 0.95 | 0.95 | 4.13\u003cbr\u003e3.86 | 4.76 | 4.18 | 4.13\u003cbr\u003e6.47 | 6.95 | 5.52 | 6.08\u003cbr\u003e6.97 | 5.49 | 5.06 | 5.27\u003cbr\u003e\u003cb\u003e7.18 | 6.99 | 6.79 | 6.77\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n\u003cb\u003e(Second is after converting huggingface)\u003c/b\u003e\n\n\u003ctable\u003e\u003cthead\u003e\u003ctr\u003e\u003cth rowspan=\"2\"\u003eTask\u003c/th\u003e\u003cth rowspan=\"2\"\u003eDataset\u003c/th\u003e\u003cth rowspan=\"2\"\u003eModel\u003c/th\u003e\u003cth colspan=\"2\"\u003ePerformance\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth\u003eMetrics\u003c/th\u003e\u003cth\u003eResults\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd rowspan=\"15\"\u003eASR\u003c/td\u003e\u003ctd rowspan=\"7\"\u003e\u003cb\u003eLibrispeech\u003c/b\u003e\u003cbr\u003edev-clean | dev-other | \u003cbr\u003etest-clean | test-other\u003c/td\u003e\u003ctd\u003eSpeechT5\u003c/td\u003e\u003ctd rowspan=\"7\"\u003eWER \u003c/td\u003e\u003ctd\u003e2.1 | 5.5 | 2.4 | 5.8\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechNet\u003c/td\u003e\u003ctd\u003e- | - | 30.7 | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSLM-FT\u003c/td\u003e\u003ctd\u003e- | - | 2.6 | 5.0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSALMONN\u003c/td\u003e\u003ctd\u003e- | - | 2.1 | 4.9\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechVerse\u003c/td\u003e\u003ctd\u003e- | - | 2.1 | 4.4\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e1.8 | 4.0 | 2.0 | 4.2\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e1.7 | 3.6 | 1.7 | 4.0\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"2\"\u003e\u003cb\u003eCommon Voice 15\u003c/b\u003e \u003cbr\u003een | zh | yue | fr\u003c/td\u003e\u003ctd\u003eWhisper-large-v3\u003c/td\u003e\u003ctd rowspan=\"2\"\u003eWER \u003c/td\u003e\u003ctd\u003e9.3 | 12.8 | 10.9 | 10.8\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e8.7 | 6.5 | 5.9 | 9.6\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd rowspan=\"2\"\u003e\u003cb\u003eFleurs\u003c/b\u003e \u003cbr\u003ezh\u003c/td\u003e\u003ctd\u003eWhisper-large-v3\u003c/td\u003e\u003ctd rowspan=\"2\"\u003eWER \u003c/td\u003e\u003ctd\u003e7.7\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e7.0\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003e\u003cb\u003eAishell2\u003c/b\u003e \u003cbr\u003eMic | iOS | Android\u003c/td\u003e\u003ctd\u003eMMSpeech-base\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eWER \u003c/td\u003e\u003ctd\u003e4.5 | 3.9 | 4.0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eParaformer-large\u003c/td\u003e\u003ctd\u003e- | \u003cb\u003e2.9\u003c/b\u003e | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e3.3 | 3.1 | 3.3\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e3.2\u003c/b\u003e | 3.1 | \u003cb\u003e2.9\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"8\"\u003eS2TT\u003c/td\u003e\u003ctd rowspan=\"5\"\u003e\u003cb\u003eCoVoST2\u003c/b\u003e \u003cbr\u003een-de | de-en | \u003cbr\u003een-zh | zh-en\u003c/td\u003e\u003ctd\u003eSALMONN\u003c/td\u003e\u003ctd rowspan=\"5\"\u003eBLEU \u003c/td\u003e\u003ctd\u003e18.6 | - | 33.1 | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eSpeechLLaMA\u003c/td\u003e\u003ctd\u003e- | 27.1 | - | 12.3\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eBLSP\u003c/td\u003e\u003ctd\u003e14.1 | - | - | -\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e25.1 | \u003cb\u003e33.9\u003c/b\u003e | 41.5 | 15.7\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e29.6\u003c/b\u003e | 33.6 | \u003cb\u003e45.6\u003c/b\u003e | \u003cb\u003e24.0\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd rowspan=\"3\"\u003e\u003cb\u003eCoVoST2\u003c/b\u003e \u003cbr\u003ees-en | fr-en | it-en |\u003c/td\u003e\u003ctd\u003eSpeechLLaMA\u003c/td\u003e\u003ctd rowspan=\"3\"\u003eBLEU \u003c/td\u003e\u003ctd\u003e27.9 | 25.2 | 25.9\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e39.7 | 38.5 | 36.0\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e38.7 | 37.2 | 35.2\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"3\"\u003eSER\u003c/td\u003e\u003ctd rowspan=\"3\"\u003e\u003cb\u003eMeld\u003c/b\u003e\u003c/td\u003e\u003ctd\u003eWavLM-large\u003c/td\u003e\u003ctd rowspan=\"3\"\u003eACC \u003c/td\u003e\u003ctd\u003e0.542\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e0.557\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e0.535\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd rowspan=\"4\"\u003eVSC\u003c/td\u003e\u003ctd rowspan=\"4\"\u003e\u003cb\u003eVocalSound\u003c/b\u003e\u003c/td\u003e\u003ctd\u003eCLAP\u003c/td\u003e\u003ctd rowspan=\"4\"\u003eACC \u003c/td\u003e\u003ctd\u003e0.4945\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003ePengi\u003c/td\u003e\u003ctd\u003e0.6035\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen-Audio\u003c/td\u003e\u003ctd\u003e0.9289\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003e\u003cb\u003e0.9395\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eAIR-Bench \u003cbr\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eChat Benchmark\u003c/b\u003e\u003cbr\u003eSpeech | Sound |\u003cbr\u003e Music | Mixed-Audio\u003c/td\u003e\u003ctd\u003eSALMONN\u003cbr\u003eBLSP\u003cbr\u003ePandagpt\u003cbr\u003eMacaw-LLM\u003cbr\u003eSpeechGPT\u003cbr\u003eNext-gpt\u003cbr\u003eQwen-Audio\u003cbr\u003eGemini-1.5-pro\u003cbr\u003eQwen2-Audio\u003c/td\u003e\u003ctd\u003eGPT-4 \u003c/td\u003e\u003ctd\u003e6.16 | 6.28 | 5.95 | 6.08\u003cbr\u003e6.17 | 5.55 | 5.08 | 5.33\u003cbr\u003e3.58 | 5.46 | 5.06 | 4.25\u003cbr\u003e0.97 | 1.01 | 0.91 | 1.01\u003cbr\u003e1.57 | 0.95 | 0.95 | 4.13\u003cbr\u003e3.86 | 4.76 | 4.18 | 4.13\u003cbr\u003e6.47 | \u003cb\u003e6.95\u003c/b\u003e | 5.52 | 6.08\u003cbr\u003e6.97 | 5.49 | 5.06 | 5.27\u003cbr\u003e\u003cb\u003e7.24\u003c/b\u003e | 6.83 | \u003cb\u003e6.73\u003c/b\u003e | \u003cb\u003e6.42\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n\nWe have provided **all** evaluation scripts to reproduce our results. Please refer to [eval_audio/EVALUATION.md](eval_audio/EVALUATION.md) for details.\n\n## Requirements\nThe code of Qwen2-Audio has been in the latest Hugging face transformers and we advise you to build from source with command `pip install git+https://github.com/huggingface/transformers`, or you might encounter the following error:\n```\nKeyError: 'qwen2-audio'\n```\n\n## Quickstart\nBelow, we provide simple examples to show how to use Qwen2-Audio and Qwen2-Audio-Instruct with 🤗 Transformers.\nBefore running the code, make sure you have setup the environment and installed the required packages. Make sure you meet the above requirements, and then install the dependent libraries.\nNow you can start with ModelScope or Transformers. Qwen2-Audio models currently perform best with audio clips under 30 seconds.\n#### 🤗 Transformers\nIn the following, we demonstrate how to use `Qwen2-Audio-7B-Instruct` for the inference, supporting both voice chat and audio analysis modes. Note that we have used the ChatML format for dialog, in this demo we show how to leverage `apply_chat_template` for this purpose.\n\n##### Voice Chat Inference\nIn the voice chat mode, users can freely engage in voice interactions with Qwen2-Audio without text input:\n```python\nfrom io import BytesIO\nfrom urllib.request import urlopen\nimport librosa\nfrom transformers import Qwen2AudioForConditionalGeneration, AutoProcessor\n\nprocessor = AutoProcessor.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\")\nmodel = Qwen2AudioForConditionalGeneration.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\", device_map=\"auto\")\n\nconversation = [\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/guess_age_gender.wav\"},\n    ]},\n    {\"role\": \"assistant\", \"content\": \"Yes, the speaker is female and in her twenties.\"},\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/translate_to_chinese.wav\"},\n    ]},\n]\ntext = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)\naudios = []\nfor message in conversation:\n    if isinstance(message[\"content\"], list):\n        for ele in message[\"content\"]:\n            if ele[\"type\"] == \"audio\":\n                audios.append(librosa.load(\n                    BytesIO(urlopen(ele['audio_url']).read()), \n                    sr=processor.feature_extractor.sampling_rate)[0]\n                )\n\ninputs = processor(text=text, audios=audios, return_tensors=\"pt\", padding=True)\ninputs.input_ids = inputs.input_ids.to(\"cuda\")\n\ngenerate_ids = model.generate(**inputs, max_length=256)\ngenerate_ids = generate_ids[:, inputs.input_ids.size(1):]\n\nresponse = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]\n```\n\n##### Audio Analysis Inference\nIn the audio analysis, users could provide both audio and text instructions for analysis:\n```python\nfrom io import BytesIO\nfrom urllib.request import urlopen\nimport librosa\nfrom transformers import Qwen2AudioForConditionalGeneration, AutoProcessor\n\nprocessor = AutoProcessor.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\")\nmodel = Qwen2AudioForConditionalGeneration.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\", device_map=\"auto\")\n\nconversation = [\n    {'role': 'system', 'content': 'You are a helpful assistant.'}, \n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/glass-breaking-151256.mp3\"},\n        {\"type\": \"text\", \"text\": \"What's that sound?\"},\n    ]},\n    {\"role\": \"assistant\", \"content\": \"It is the sound of glass shattering.\"},\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"text\", \"text\": \"What can you do when you hear that?\"},\n    ]},\n    {\"role\": \"assistant\", \"content\": \"Stay alert and cautious, and check if anyone is hurt or if there is any damage to property.\"},\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/1272-128104-0000.flac\"},\n        {\"type\": \"text\", \"text\": \"What does the person say?\"},\n    ]},\n]\ntext = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)\naudios = []\nfor message in conversation:\n    if isinstance(message[\"content\"], list):\n        for ele in message[\"content\"]:\n            if ele[\"type\"] == \"audio\":\n                audios.append(\n                    librosa.load(\n                        BytesIO(urlopen(ele['audio_url']).read()), \n                        sr=processor.feature_extractor.sampling_rate)[0]\n                )\n\ninputs = processor(text=text, audios=audios, return_tensors=\"pt\", padding=True)\ninputs.input_ids = inputs.input_ids.to(\"cuda\")\n\ngenerate_ids = model.generate(**inputs, max_length=256)\ngenerate_ids = generate_ids[:, inputs.input_ids.size(1):]\n\nresponse = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]\n```\n\n##### Batch Inference\nWe also support batch inference:\n```python\nfrom io import BytesIO\nfrom urllib.request import urlopen\nimport librosa\nfrom transformers import Qwen2AudioForConditionalGeneration, AutoProcessor\n\nprocessor = AutoProcessor.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\")\nmodel = Qwen2AudioForConditionalGeneration.from_pretrained(\"Qwen/Qwen2-Audio-7B-Instruct\", device_map=\"auto\")\n\nconversation1 = [\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/glass-breaking-151256.mp3\"},\n        {\"type\": \"text\", \"text\": \"What's that sound?\"},\n    ]},\n    {\"role\": \"assistant\", \"content\": \"It is the sound of glass shattering.\"},\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/f2641_0_throatclearing.wav\"},\n        {\"type\": \"text\", \"text\": \"What can you hear?\"},\n    ]}\n]\n\nconversation2 = [\n    {\"role\": \"user\", \"content\": [\n        {\"type\": \"audio\", \"audio_url\": \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/1272-128104-0000.flac\"},\n        {\"type\": \"text\", \"text\": \"What does the person say?\"},\n    ]},\n]\n\nconversations = [conversation1, conversation2]\n\ntext = [processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False) for conversation in conversations]\n\naudios = []\nfor conversation in conversations:\n    for message in conversation:\n        if isinstance(message[\"content\"], list):\n            for ele in message[\"content\"]:\n                if ele[\"type\"] == \"audio\":\n                    audios.append(\n                        librosa.load(\n                            BytesIO(urlopen(ele['audio_url']).read()), \n                            sr=processor.feature_extractor.sampling_rate)[0]\n                    )\n\ninputs = processor(text=text, audios=audios, return_tensors=\"pt\", padding=True)\ninputs['input_ids'] = inputs['input_ids'].to(\"cuda\")\ninputs.input_ids = inputs.input_ids.to(\"cuda\")\n\ngenerate_ids = model.generate(**inputs, max_length=256)\ngenerate_ids = generate_ids[:, inputs.input_ids.size(1):]\n\nresponse = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)\n```\nRunning Qwen2-Audio pretrained base model is also simple.\n```python\nfrom io import BytesIO\nfrom urllib.request import urlopen\nimport librosa\nfrom transformers import AutoProcessor, Qwen2AudioForConditionalGeneration\n\nmodel = Qwen2AudioForConditionalGeneration.from_pretrained(\"Qwen/Qwen2-Audio-7B\" ,trust_remote_code=True)\nprocessor = AutoProcessor.from_pretrained(\"Qwen/Qwen2-Audio-7B\" ,trust_remote_code=True)\n\nprompt = \"\u003c|audio_bos|\u003e\u003c|AUDIO|\u003e\u003c|audio_eos|\u003eGenerate the caption in English:\"\nurl = \"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Audio/glass-breaking-151256.mp3\"\naudio, sr = librosa.load(BytesIO(urlopen(url).read()), sr=processor.feature_extractor.sampling_rate)\ninputs = processor(text=prompt, audios=audio, return_tensors=\"pt\")\n\ngenerated_ids = model.generate(**inputs, max_length=256)\ngenerated_ids = generated_ids[:, inputs.input_ids.size(1):]\nresponse = processor.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]\n```\n#### 🤖 ModelScope\nWe strongly advise users especially those in mainland China to use ModelScope. `snapshot_download` can help you solve issues concerning downloading checkpoints.\n## Demo\n### Web UI\nWe provide code for users to build a web UI demo. Before you start, make sure you install the following packages:\n```\npip install -r requirements_web_demo.txt\n```\nThen run the command below and click on the generated link:\n```\npython demo/web_demo_audio.py\n```\n\u003cbr\u003e\n\n## demos \nMore impressive cases will be updated on our blog at [Qwen's blog](https://qwenlm.github.io/blog/qwen2-audio).\n\n## We Are Hiring\n\nIf you are interested in joining us as full-time or intern, please contact us at `qwen_audio@list.alibaba-inc.com`.\n\u003cbr\u003e\n\n## License Agreement\n\nCheck the license of each model inside its HF repo. It is NOT necessary for you to submit a request for commercial usage.\n\u003cbr\u003e\n\n## Citation\n\nIf you find our paper and code useful in your research, please consider giving a star :star: and citation :pencil: :)\n\n```BibTeX\n@article{Qwen-Audio,\n  title={Qwen-Audio: Advancing Universal Audio Understanding via Unified Large-Scale Audio-Language Models},\n  author={Chu, Yunfei and Xu, Jin and Zhou, Xiaohuan and Yang, Qian and Zhang, Shiliang and Yan, Zhijie  and Zhou, Chang and Zhou, Jingren},\n  journal={arXiv preprint arXiv:2311.07919},\n  year={2023}\n}\n```\n\n```BibTeX\n@article{Qwen2-Audio,\n  title={Qwen2-Audio Technical Report},\n  author={Chu, Yunfei and Xu, Jin and Yang, Qian and Wei, Haojie and Wei, Xipin and Guo,  Zhifang and Leng, Yichong and Lv, Yuanjun and He, Jinzheng and Lin, Junyang and Zhou, Chang and Zhou, Jingren},\n  journal={arXiv preprint arXiv:2407.10759},\n  year={2024}\n}\n```\n\u003cbr\u003e\n\n## Contact Us\n\nIf you are interested to leave a message to either our research team or product team, feel free to send an email to `qianwen_opensource@alibabacloud.com`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQwenLM%2FQwen2-Audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQwenLM%2FQwen2-Audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQwenLM%2FQwen2-Audio/lists"}