Akapulu Labs logo Akapulu Labs Research

Qwen2-Audio

Qwen2-Audio Technical Report

Qwen2-Audio — method overview

A large-scale audio-language model for speech understanding and voice interaction using natural language prompts for pre-training. It introduces seamless Audio Analysis and Voice Chat modes that switch automatically without explicit prompts, achieving state-of-the-art performance on audio instruction-following tasks.

  • llm
  • multimodal
  • asr
  • dialogue
  • emotion

Authors: Yunfei Chu, Jin Xu, Qian Yang, Haojie Wei, Xipin Wei, Zhifang Guo, Yichong Leng, Yuanjun Lv, Jinzheng He, Junyang Lin, Chang Zhou, Jingren Zhou

Categories: eess.AS, cs.CL, cs.LG

Comment: https://github.com/QwenLM/Qwen2-Audio. Checkpoints, codes and scripts will be opensoursed soon

Published 2024-07-15 · Updated 2024-07-15

Abstract

We 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. In contrast to complex hierarchical tags, we have simplified the pre-training process by utilizing natural language prompts for different data and tasks, and have further expanded the data volume. We have boosted the instruction-following capability of Qwen2-Audio and implemented two distinct audio interaction modes for voice chat and audio analysis. In the voice chat mode, users can freely engage in voice interactions with Qwen2-Audio without text input. In the audio analysis mode, users could provide audio and text instructions for analysis during the interaction. Note that we do not use any system prompts to switch between voice chat and audio analysis modes. Qwen2-Audio is capable of intelligently comprehending the content within audio and following voice commands to respond appropriately. For instance, in an audio segment that simultaneously contains sounds, multi-speaker conversations, and a voice command, Qwen2-Audio can directly understand the command and provide an interpretation and response to the audio. Additionally, DPO has optimized the model's performance in terms of factuality and adherence to desired behavior. According to the evaluation results from AIR-Bench, Qwen2-Audio outperformed previous SOTAs, such as Gemini-1.5-pro, in tests focused on audio-centric instruction-following capabilities. Qwen2-Audio is open-sourced with the aim of fostering the advancement of the multi-modal language community.


Introduction and Motivation

Audio is a fundamental medium for human communication, carrying rich semantic, paralinguistic, and acoustic information. Building systems that comprehend all forms of audio — speech, environmental sounds, music, and mixed audio — is considered a key milestone on the path toward Artificial General Intelligence (AGI). Large Audio-Language Models (LALMs) have recently emerged as a promising paradigm for this goal, demonstrating strong performance on diverse audio understanding and reasoning tasks.

Qwen2-Audio is the second generation of the Qwen-Audio series from Alibaba's Qwen Team, and it introduces several substantial improvements over its predecessor. The central design philosophy shifts away from hierarchical task-specific tags (used in Qwen-Audio) toward natural language prompts for all pre-training tasks, significantly simplifying the training pipeline. Qwen2-Audio also dramatically scales up training data volume and adds a post-training alignment stage using Direct Preference Optimization (DPO), resulting in a model that is both more capable and better aligned with human preferences.

A defining feature of Qwen2-Audio is the introduction of two seamlessly integrated interaction modes — Audio Analysis and Voice Chat — that users navigate naturally without needing system prompts or explicit mode-switching. The model is openly released to foster advances in multimodal language research.

Performance radar of Qwen2-Audio vs. prior LALMs across ASR, S2TT, SER, VSC, and AIR-Bench chat benchmarks.
Performance of Qwen2-Audio, Qwen-Audio, and previous top-tier LALMs (SpeechT5, SpeechNet, SpeechLLaMA, SALMONN, Whisper, Pengi, SpeechVerse) across 10 datasets covering ASR, Speech-to-Text Translation (S2TT), Speech Emotion Recognition (SER), Vocal Sound Classification (VSC), and the AIR-Bench instruction-following benchmark. ASR results for Librispeech and Aishell2 are reported as 1 − WER%. CoVoST2 is the average BLEU score over seven translation directions. AIR-Bench scores are GPT-4-assessed values from 0–10. Qwen2-Audio achieves top performance without any task-specific fine-tuning.

Model Architecture

Qwen2-Audio follows the standard LALM encoder-decoder paradigm, consisting of two main components: an audio encoder and a large language model (LLM) decoder.

Audio Encoder

Unlike Qwen-Audio, which used Whisper-large-v2 as its audio encoder backbone, Qwen2-Audio initializes the audio encoder from Whisper-large-v3. Audio preprocessing involves:

  • Resampling input audio to 16 kHz.
  • Converting raw waveforms to a 128-channel mel-spectrogram using a 25 ms window and a 10 ms hop size.
  • Applying a pooling layer with stride 2 to halve the temporal resolution of encoder outputs, so each output frame corresponds approximately to a 40 ms segment of the original signal.

Language Model

The decoder is built on Qwen-7B, a large language model from the Qwen series. The total parameter count of Qwen2-Audio is 8.2 billion parameters.

Training Objective

Given paired data $(\mathbf{a}, \mathbf{x})$ where $\mathbf{a}$ is an audio sequence and $\mathbf{x}$ is a text sequence, the pre-training objective is autoregressive next-token prediction:

$$\mathcal{P}_{\theta}(x_t \mid \mathbf{x}_{where $\theta$ and $\phi$ denote the trainable parameters of the LLM and the audio encoder, respectively. The model is conditioned on encoded audio representations and all previously generated text tokens $\mathbf{x}_{
Overview of the three-stage training process of Qwen2-Audio.
The overview of the three-stage training process of Qwen2-Audio: large-scale multi-task pre-training with natural language prompts, supervised fine-tuning (SFT) with curated instruction data covering both Audio Analysis and Voice Chat modes, and Direct Preference Optimization (DPO) for alignment with human preferences.

Training Pipeline

Qwen2-Audio follows a three-stage training pipeline: (1) multi-task pre-training, (2) supervised fine-tuning (SFT), and (3) Direct Preference Optimization (DPO). This mirrors best practices from modern LLM alignment pipelines and extends them to the multimodal audio-language domain.

Stage 1: Pre-training

The pre-training stage is a large-scale multi-task learning phase spanning a broad range of audio understanding tasks. A key innovation compared to the original Qwen-Audio is the replacement of hierarchical task tags with natural language prompts. Where Qwen-Audio used structured symbolic tags to distinguish tasks, Qwen2-Audio simply phrases each training example as a natural language instruction-response pair. The authors find this leads to better generalization and improved instruction-following capabilities.

Pre-training data is further expanded significantly over Qwen-Audio. The dataset spans three high-level audio categories — Speech, Sound, and Music/Song — and covers a wide variety of tasks:

  • Speech tasks: Automatic Speech Recognition (ASR, ~30k hours, multiple languages), Speech-to-Text Translation (S2TT, ~3.7k hours), Overlapped Speech Recognition (~<1k hours), Dialect ASR (~2k hours), Speech Recognition with Word-level Timestamps (English ~10k hours, Mandarin ~11k hours), Dialect Identification (~2k hours), Spoken Language Identification (~11.7k hours), Speaker Gender Classification (~4.8k hours), Emotion Recognition (~<1k hours), Speaker Verification (~1.2k hours), Speaker Diarization (~<1k hours), Speech Entity Recognition (~<1k hours), Keyword Spotting (~<1k hours), Intent Classification (~<1k hours), Slot Filling (~<1k hours), Speaker Age Prediction (~4.8k hours), Vocal Sound Classification (~<1k hours).
  • Sound tasks: Automatic Audio Captioning (~8.4k hours), Sound Event Classification (~5.4k hours), Acoustic Scene Classification (~<1k hours), Sound Event Detection with timestamps (~<1k hours), Audio Question Answering (~<1k hours).
  • Music & Song tasks: Singer Identification (~<1k hours), Singer and Music Emotion Recognition (~<1k hours), Music Caption (~25k hours), Music Instrument Classification (~<1k hours), Music Note Analysis (~<1k hours), Music Genre Recognition (~9.5k hours), Music Recognition (~<1k hours), Music Question Answering (~<1k hours).
Statistics (hours) of pre-training dataset.
Statistics (hours) of the Qwen2-Audio pre-training dataset, spanning speech (ASR, translation, dialects, speaker attributes, etc.), sound (captioning, classification, detection), and music/song tasks (captioning, genre recognition, etc.).

Stage 2: Supervised Fine-tuning (SFT)

Pre-training equips the model with broad audio understanding, but SFT adapts the model to follow human instructions in realistic interaction scenarios. The SFT stage introduces two distinct interaction modes that are jointly trained so that no explicit mode-switching is required during use:

  • Audio Analysis Mode: The user provides one or more audio clips (which may be speech, environmental sounds, music, or mixed audio) along with instructions — given either as text or as spoken audio. Qwen2-Audio processes the audio signal holistically and responds to the instructions. This mode is well-suited to offline or analytical workflows.
  • Voice Chat Mode: The user engages in open-ended conversational interaction using voice. Qwen2-Audio treats the spoken content as natural dialogue turns. Text interaction is also available in this mode. This mode targets real-time, online dialogue use cases.

The authors emphasize that no system prompt is needed to switch between modes. Qwen2-Audio autonomously detects the nature of the input and responds accordingly. For example, given an audio clip where the first portion contains keyboard typing sounds followed by a spoken question "What is this sound?", the model correctly identifies the sound event and responds, "This is the sound of a keyboard."

A key finding from preliminary studies is that data quality and complexity in the SFT stage significantly affects final model performance. Accordingly, the SFT dataset was meticulously curated with rigorous quality control to ensure diversity, complexity, and accuracy of the instruction-response pairs.

Stage 3: Direct Preference Optimization (DPO)

To further align Qwen2-Audio's responses with human preferences — especially regarding factuality and adherence to desired behaviors — the model undergoes Direct Preference Optimization (DPO). DPO uses a dataset $\mathcal{D}$ of triplets $(\mathbf{x}, \mathbf{y}_w, \mathbf{y}_l)$, where $\mathbf{x}$ is an input (including audio), $\mathbf{y}_w$ is the human-annotated preferred response, and $\mathbf{y}_l$ is the dispreferred response. The DPO objective is:

$$\mathcal{L}_{\text{DPO}}(\mathcal{P}_\theta; \mathcal{P}_{\text{ref}}) = -\mathbb{E}_{(\mathbf{x}, \mathbf{y}_w, \mathbf{y}_l) \sim \mathcal{D}} \left[ \log \sigma \!\left( \beta \log \frac{\mathcal{P}_\theta(\mathbf{y}_w \mid \mathbf{x})}{\mathcal{P}_{\text{ref}}(\mathbf{y}_w \mid \mathbf{x})} - \beta \log \frac{\mathcal{P}_\theta(\mathbf{y}_l \mid \mathbf{x})}{\mathcal{P}_{\text{ref}}(\mathbf{y}_l \mid \mathbf{x})} \right) \right]$$

where $\mathcal{P}_{\text{ref}}$ is the reference model (initialized from the SFT checkpoint), $\sigma$ is the sigmoid function, and $\beta$ is a hyperparameter controlling the deviation from the reference policy. DPO removes the need for a separate reward model, directly optimizing the policy using preference pairs.

Evaluation Benchmarks

Qwen2-Audio is evaluated on a comprehensive suite of 13 datasets covering four task categories, as summarized below:

TaskDescriptionDataset(s)Metric
ASRAutomatic Speech RecognitionLibrispeech, Aishell2, Common Voice 15, FleursWER ↓
S2TTSpeech-to-Text TranslationCoVoST2 (7 directions)BLEU ↑
SERSpeech Emotion RecognitionMeldACC ↑
VSCVocal Sound ClassificationVocalSoundACC ↑
AIR-Bench (Chat)Instruction-following across speech, sound, music, mixed audioFisher, SpokenWOZ, IEMOCAP, Common Voice, Clotho, MusicCaps, AudioCapsGPT-4 score (0–10) ↑

The paper emphasizes that many older SLU and SER benchmarks are highly constrained and fail to reflect real-world performance, which is why AIR-Bench is treated as the primary evaluation for instruction-following and chat capabilities. All evaluation datasets are strictly excluded from training to prevent data leakage.

Main Results

Automatic Speech Recognition (ASR)

On Librispeech, Qwen2-Audio achieves WER of 1.3 / 3.4 / 1.6 / 3.6 on dev-clean, dev-other, test-clean, and test-other respectively, outperforming all prior systems including SpeechT5 (2.1/5.5/2.4/5.8), SLM-FT (–/–/2.6/5.0), SALMONN (–/–/2.1/4.9), SpeechVerse (–/–/2.1/4.4), and Qwen-Audio (1.8/4.0/2.0/4.2).

On Common Voice 15 (English, Chinese, Yue, French), Qwen2-Audio achieves WER of 8.6 / 6.9 / 5.9 / 9.6 versus Whisper-large-v3's 9.3 / 12.8 / 10.9 / 10.8. Note that Qwen2-Audio is not evaluated in a zero-shot manner on Common Voice 15, while Whisper is.

On Fleurs (zh), evaluated in zero-shot fashion for both models, Qwen2-Audio achieves WER 7.5 vs. Whisper-large-v3's 7.7.

On Aishell2 (Mic / iOS / Android), Qwen2-Audio achieves 3.0 / 3.0 / 2.9 WER, outperforming Qwen-Audio (3.3/3.1/3.3) and competitive with Paraformer-large (–/2.9/–).

Speech-to-Text Translation (S2TT)

On CoVoST2, Qwen2-Audio achieves state-of-the-art BLEU scores across all seven translation directions:

Modelen-dede-enen-zhzh-enes-enfr-enit-en
SALMONN18.633.1
SpeechLLaMA27.112.327.925.225.9
BLSP14.1
Qwen-Audio25.133.941.515.739.738.536.0
Qwen2-Audio29.935.245.224.440.038.536.3

Speech Emotion Recognition (SER)

On the Meld dataset, Qwen2-Audio achieves accuracy of 0.553, slightly below Qwen-Audio (0.557) and above WavLM-large (0.542). This is one of the few tasks where Qwen2-Audio does not surpass its predecessor, illustrating that certain tightly constrained SLU benchmarks may not fully capture generative model strengths.

Vocal Sound Classification (VSC)

On VocalSound, Qwen2-Audio achieves 0.9392 accuracy, outperforming Qwen-Audio (0.9289), Pengi (0.6035), and CLAP (0.4945).

AIR-Bench Chat Benchmark

The AIR-Bench chat benchmark evaluates instruction-following across four audio modalities using GPT-4-based scoring (0–10 scale). Qwen2-Audio achieves state-of-the-art results across all four dimensions:

ModelSpeechSoundMusicMixed-Audio
SALMONN6.166.285.956.08
BLSP6.175.555.085.33
Pandagpt3.585.465.064.25
Macaw-LLM0.971.010.911.01
SpeechGPT1.570.950.954.13
Next-GPT3.864.764.184.13
Qwen-Audio6.476.955.526.08
Gemini-1.5-pro6.975.495.065.27
Qwen2-Audio7.186.996.796.77

A notable caveat is that Gemini-1.5-pro's results are based on a reduced sample set — approximately one fifth of test samples were excluded due to SAFETY filter rejections during API evaluation. Qwen2-Audio's improvements over Gemini-1.5-pro are especially pronounced on sound (+1.50), music (+1.73), and mixed-audio (+1.50) dimensions.

Qualitative Case Studies

The paper includes several illustrated examples demonstrating Qwen2-Audio's diverse interaction capabilities across both modes. These examples showcase the model's ability to handle natural, free-flowing conversations and structured analytical queries.

Example of Qwen2-Audio in free speech chat (demo 1).
Example showing Qwen2-Audio's capability in free chat around speech.
Example of Qwen2-Audio in free speech chat (demo 2).
Example showing Qwen2-Audio's capability in free chat around speech.
Example of Qwen2-Audio in free chat around speech and nature sound.
Example showing Qwen2-Audio's capability in free chat around speech and nature sound.
Example of Qwen2-Audio in speech analysis.
Example showing Qwen2-Audio's capability in speech analysis.
Example of Qwen2-Audio in sound analysis.
Example showing Qwen2-Audio's capability in sound analysis.
Example of Qwen2-Audio in music analysis.
Example showing Qwen2-Audio's capability in music analysis.
Example of Qwen2-Audio's robustness in mixed audio analysis.
Example showing Qwen2-Audio's robustness in mixed audio analysis, where the input simultaneously contains sounds, speech from multiple speakers, and a voice command.

Key Design Decisions and Contributions

Natural Language Prompts vs. Hierarchical Tags

One of the most impactful changes from Qwen-Audio to Qwen2-Audio is replacing the hierarchical symbolic tag system with natural language task prompts. The prior approach required careful construction and maintenance of a tag hierarchy to differentiate tasks during pre-training. By using plain language descriptions (e.g., "Transcribe the following speech into text." or "What emotions are being expressed by the speaker?"), the model learns a more uniform representation that generalizes better and supports zero-shot instruction following without needing to memorize special tags.

Seamless Dual-Mode Interaction Without System Prompts

The jointly-trained Audio Analysis and Voice Chat modes represent a significant usability advancement. In practical LALMs, mode switching usually requires explicit system prompts or different model checkpoints. Qwen2-Audio trains both modes simultaneously, allowing the model to autonomously determine how to interpret an audio input — whether as an analysis target or as a direct voice command — based on the context of the conversation.

DPO for Audio-Language Alignment

Applying DPO to a multimodal audio-language model is a notable contribution. The DPO stage specifically addresses factuality (ensuring responses are grounded in the actual audio content) and behavioral alignment (avoiding harmful, irrelevant, or low-quality responses). The preference annotation process produces triplets of audio+prompt inputs with annotated good and bad completions, enabling contrastive optimization without a separate reward model.

Scale and Breadth of Pre-training Data

Qwen2-Audio's pre-training dataset covers a remarkable breadth of tasks — over 30 distinct audio understanding tasks spanning speech (recognition, translation, speaker attributes, language ID, emotion, keyword spotting), sound (captioning, classification, detection), and music (captioning, genre, instruments, notes). The total data volume extends to tens of thousands of hours across key tasks like multilingual ASR, music captioning, and speech translation.

Limitations and Caveats

While the paper reports strong results across most benchmarks, a few limitations and caveats are worth noting:

  • Inconsistent zero-shot evaluation: On Common Voice 15, Qwen2-Audio is evaluated after training on Common Voice data, whereas Whisper-large-v3 is evaluated in a true zero-shot manner. This makes direct comparison on that benchmark non-apples-to-apples. The Fleurs evaluation is zero-shot for both models.
  • SER performance plateau: On the Meld speech emotion recognition benchmark, Qwen2-Audio (0.553) marginally underperforms Qwen-Audio (0.557). The paper itself notes that many SLU and SER benchmarks are limited in their ability to reflect real-world performance, motivating the heavier emphasis on AIR-Bench.
  • Gemini-1.5-pro evaluation fairness: During AIR-Bench evaluation, approximately 20% of Gemini-1.5-pro's test samples were dropped due to safety filter refusals. The resulting reduced sample count may affect the representativeness of Gemini's scores, though the direction of bias is unclear.
  • No ablation studies reported: The paper does not include formal ablation experiments (e.g., comparing natural language prompts vs. hierarchical tags, with vs. without DPO, or different data scales), making it difficult to quantitatively attribute improvements to specific design choices.
  • Single LLM backbone: The system relies on Qwen-7B as its language backbone. The impact of scaling or changing the LLM component is not explored in this report.

Conclusion

Qwen2-Audio represents a substantial advance over Qwen-Audio in both audio understanding performance and interactive capabilities. The three-stage training pipeline — natural language prompt-driven pre-training at scale, joint SFT across Audio Analysis and Voice Chat modes, and DPO alignment — produces a model that achieves state-of-the-art results on a wide range of audio benchmarks without task-specific fine-tuning. Most notably, it surpasses Gemini-1.5-pro on the AIR-Bench chat benchmark across all four audio modalities (speech, sound, music, and mixed audio), demonstrating strong generalization to real-world audio instruction-following scenarios. The model is open-sourced to support continued progress in the multimodal language community.

Code & Implementation

This repository serves as the official release hub for Qwen2-Audio, an audio-language model described in the technical report. The repository is structured primarily as a model release and evaluation suite rather than a training implementation repository.

Repository Structure

  • Model Checkpoints: Released on HuggingFace and ModelScope. Two versions provided: Qwen2-Audio-7B (base) and Qwen2-Audio-7B-Instruct (instruction-tuned with DPO).
  • Evaluation Suite (eval_audio/): Implements benchmarking scripts for the 13 standard evaluation tasks described in the paper:
    • ASR evaluation on Librispeech, Aishell2, Common Voice, Fleurs (WER metric)
    • Speech-to-Text Translation on CoVoST2 (BLEU metric)
    • Speech Emotion Recognition on Meld (ACC metric)
    • Vocal Sound Classification on VocalSound (ACC metric)
    • AIR-Bench Chat Benchmark for audio-centric instruction-following (GPT-4 evaluation)
    Evaluation scripts use distributed PyTorch training utilities and compute standard metrics (jiwer, sacrebleu, edit_distance).
  • Demo (demo/): Web interface for inference demonstrating the model's voice chat and audio analysis modes.

Paper–Repository Mapping

The paper describes a three-stage training process (audio processing, instruction alignment, and DPO optimization) and validates the approach on 13 benchmarks. This repository provides:

  • Released model weights compatible with Hugging Face transformers, implementing the final fine-tuned Qwen2-Audio-7B-Instruct architecture.
  • Evaluation harnesses to reproduce the benchmark results (ASR WER, S2TT BLEU, SER/VSC accuracy, AIR-Bench GPT-4 scores) reported in Tables 1 and 2 of the technical report.
  • No training code is included; model training implementation details remain proprietary.

Usage

Models are loaded via standard Hugging Face APIs. Evaluation requires downloading datasets (Librispeech, Aishell2, Common Voice, CoVoST2, Meld, VocalSound, AIR-Bench) and pre-processed JSONL evaluation manifests, then running distributed evaluation scripts with torch.distributed.launch.