Akapulu Labs logo Akapulu Labs Research

Qwen-Audio

Qwen-Audio: Advancing Universal Audio Understanding via Unified Large-Scale Audio-Language Models

Qwen-Audio — method overview

A unified audio-language model that handles speech, natural sounds, and music across 30+ tasks with a single encoder. It uses hierarchical task tags to resolve multi-task interference, enabling strong zero-shot transfer without task-specific fine-tuning—outperforming prior specialist audio systems.

  • llm
  • multimodal
  • asr
  • dialogue

Demos

Qwen-Audio demonstrates universal audio understanding across 30+ diverse tasks—speech recognition, audio captioning, scene classification, emotion recognition, and music analysis—without task-specific fine-tuning. Evaluate these demos for: (1) multi-modal comprehension across speech, environmental sounds, and music; (2) strong baseline performance relative to specialized models on Aishell1, Cochlscene, and ClothoAQA benchmarks; (3) multi-turn dialogue capabilities and reasoning over multiple audio inputs in Qwen-Audio-Chat.

Authors: Yunfei Chu, Jin Xu, Xiaohuan Zhou, Qian Yang, Shiliang Zhang, Zhijie Yan, Chang Zhou, Jingren Zhou

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

Comment: The code, checkpoints and demo are released at https://github.com/QwenLM/Qwen-Audio

Published 2023-11-14 · Updated 2023-12-21

Abstract

Recently, instruction-following audio-language models have received broad attention for audio interaction with humans. However, the absence of pre-trained audio models capable of handling diverse audio types and tasks has hindered progress in this field. Consequently, most existing works have only been able to support a limited range of interaction capabilities. In this paper, we develop the Qwen-Audio model and address this limitation by scaling up audio-language pre-training to cover over 30 tasks and various audio types, such as human speech, natural sounds, music, and songs, to facilitate universal audio understanding abilities. However, directly co-training all tasks and datasets can lead to interference issues, as the textual labels associated with different datasets exhibit considerable variations due to differences in task focus, language, granularity of annotation, and text structure. To overcome the one-to-many interference, we carefully design a multi-task training framework by conditioning on a sequence of hierarchical tags to the decoder for encouraging knowledge sharing and avoiding interference through shared and specified tags respectively. Remarkably, Qwen-Audio achieves impressive performance across diverse benchmark tasks without requiring any task-specific fine-tuning, surpassing its counterparts. Building upon the capabilities of Qwen-Audio, we further develop Qwen-Audio-Chat, which allows for input from various audios and text inputs, enabling multi-turn dialogues and supporting various audio-central scenarios.


Introduction and Motivation

Large language models (LLMs) have demonstrated remarkable capabilities in knowledge retention, reasoning, and problem solving, but they inherently lack the ability to perceive non-textual modalities such as audio. Audio carries information far richer than plain text: prosody, emotion, tone, and intent in human speech; environmental cues such as train whistles, clock chimes, and thunder in natural sounds; melody and harmony in music. Enabling LLMs to understand these rich signals is therefore an important frontier in multimodal AI.

Prior instruction-following audio-language models have been constrained by a fundamental gap: the absence of pre-trained audio models capable of handling diverse audio types and tasks. Representative systems such as SpeechNet, SpeechT5, VIOLA, Whisper, and Pengi each cover only a subset of audio types — focusing on either human speech or natural sounds, but rarely both, and almost never music. This fragmentation forces practitioners to maintain separate specialist models and prevents cross-task knowledge transfer.

Qwen-Audio is introduced to fill this gap. It is a large-scale audio-language model that extends the Qwen-7B language model with a single shared audio encoder, trained jointly on more than 30 tasks spanning eight languages and all major audio types (human speech, natural sounds, music, songs). Building on top of Qwen-Audio, the authors also release Qwen-Audio-Chat, an instruction-tuned variant that supports flexible multi-turn dialogues involving mixed audio and text inputs.

Radar chart comparing Qwen-Audio against SpeechT5, SpeechNet, SpeechLLaMA, SALMONN, and Pengi across 12 benchmark datasets covering ASR, S2TT, AAC, ASC, SER, AQA, VSC, and MNA tasks.
Performance of Qwen-Audio and previous top-tier multi-task audio-text learning models (SpeechT5, SpeechNet, SpeechLLaMA, SALMONN, Pengi) across 12 benchmark datasets covering ASR, S2TT, AAC, ASC, SER, AQA, VSC, and MNA. ASR results are reported as 1 − WER%. CoVoST2 results are the average BLEU score over seven translation directions. Qwen-Audio achieves remarkable performance without any task-specific fine-tuning.

Related Work

Multi-task Audio-Text Learning

Earlier multi-task audio systems such as SpeechNet and SpeechT5 formulate audio processing as a shared encoder-decoder problem but restrict themselves to human speech inputs and outputs. A line of work (VIOLA, VoxTLM, AudioPALM, SpeechX) converts continuous speech into discrete codec tokens and treats all tasks as conditional language-model generation, typically using decoder-only Transformers. Whisper introduced a systematic multi-task training format using special tokens — for language identification, task type, and sentence-level timestamps — but remained confined to speech recognition and translation. Pengi extends this idea to natural-sound understanding tasks by using text templates to unify data formats. None of these systems jointly handle speech, sound, and music in a single model.

Interacting with LLMs through Audio

Tool-use approaches (AudioGPT, HuggingGPT) leverage external audio specialist models as tools controlled by an LLM, but lose prosodic and emotional information that cannot be represented as text. End-to-end approaches train directly on audio-text pairs: SpeechGPT discretizes speech with HuBERT tokens and uses a three-stage pipeline; BLSP aligns audio representations with text by requiring the LLM to produce the same continuation for audio and its transcript; LLaSM synthesizes speech instruction data with a TTS API; LTU creates a 5 M audio-QA dataset and fine-tunes LLaMA with LoRA; SALMONN combines a text encoder and a speech encoder fused to a frozen LLM via Q-Former-style attention. Qwen-Audio differentiates itself by using a single encoder for all audio types, training end-to-end at scale across more than 30 heterogeneous tasks, and achieving strong zero-shot transfer to held-out benchmarks.

Model Architecture

Overview of Qwen-Audio architecture and multitask pretraining framework showing the audio encoder, hierarchical tag sequence, and LLM decoder.
Overview of the Qwen-Audio architecture and multitask-pretraining format. Audio is encoded by a Whisper-large-v2-initialized encoder; a sequence of hierarchical special tags conditions the LLM decoder on the task, language, and desired output format before free-form text generation begins.

The Qwen-Audio architecture consists of two components: an audio encoder and a large language model decoder. Given paired data $(\mathbf{a}, \mathbf{x})$ where $\mathbf{a}$ is an audio sequence and $\mathbf{x}$ is a text sequence, the training objective is to maximize the autoregressive next-token probability:

$$\mathcal{P}_{\theta}(x_t \mid \mathbf{x}_{

where $\theta$ and $\phi$ are the trainable parameters of the LLM and audio encoder respectively.

Audio Encoder

Qwen-Audio uses a single audio encoder for all audio types. The encoder is initialized from Whisper-large-v2, a 32-layer Transformer model with two convolution downsampling layers as a stem, totalling 640 M parameters. Although Whisper was trained only for speech recognition and translation, its learned representations encode rich information beyond speech content — including background noise and speaker characteristics — as demonstrated by subsequent research. Audio is preprocessed by resampling to 16 kHz and converting to an 80-channel mel-spectrogram with a 25 ms window and 10 ms hop. An additional pooling layer with stride 2 further compresses the sequence so that each encoder output frame corresponds to approximately 40 ms of audio. SpecAugment (LibriSpeech Basic policy) is applied during training as data augmentation.

Large Language Model

The decoder is initialized from Qwen-7B, a 32-layer Transformer decoder with hidden size 4096 and 7.7 B total parameters. During multi-task pretraining, the LLM weights are frozen and only the audio encoder is optimized. During supervised fine-tuning (SFT), the audio encoder is frozen and only the LLM is optimized.

Multitask Pretraining

The One-to-Many Interference Problem

A core challenge of large-scale multi-task co-training in audio is that different datasets produce widely varying text output formats. The variation arises from differences in: (1) task focus (recognition vs. captioning vs. classification vs. QA); (2) language (English, Mandarin, German, French, Spanish, Italian, and others); (3) annotation granularity (word-level, sentence-level, or free-form); and (4) text structure (structured labels vs. unstructured natural language). Naively mixing all datasets creates a one-to-many mapping problem for the decoder — the same audio input may legitimately require different text responses depending on the implied task.

Simple remedies used in prior work — grouping similar tasks or appending a dataset ID — provide limited relief. Qwen-Audio proposes a more principled solution: a hierarchical tag sequence prepended to every decoder input that maximally shares information across similar tasks while unambiguously separating incompatible output formats.

Multi-task Training Format Framework

The tag sequence appended to every input is defined by the following ordered slots:

  • Transcription Tag: <|startoftranscripts|> for tasks requiring accurate linguistic transcription (ASR, speech translation). <|startofanalysis|> for all other tasks (captioning, classification, QA, etc.).
  • Audio Language Tag: A unique token identifying the spoken language in the audio, covering eight languages. For audio with no speech (natural sounds, music), the model is trained to predict a special <|unknown|> token.
  • Task Tag: Five categories — <|transcribe|>, <|translate|>, <|caption|>, <|analysis|>, and <|question-answer|>. For QA tasks, the corresponding question is appended immediately after the tag.
  • Text Language Tag: Specifies the language of the output text.
  • Timestamps Tag: Either <|timestamps|> or <|notimestamps|>. When set to <|timestamps|>, the model performs fine-grained word-level timestamp prediction (SRWT — Speech Recognition with Word-level Timestamps), interleaving start-time tokens before each word token and end-time tokens after. This differs from Whisper's sentence-level timestamps.
  • Output Instruction: Free-text instructions further specifying the desired output format or subtask.

Tags that are shared across many tasks (e.g., the audio language tag) encourage knowledge sharing; tags that differ between tasks (e.g., the transcription vs. analysis start tag) disambiguate the output format and prevent interference. The overall design principle is to make shared structure explicit while making task-specific divergences equally explicit.

Training Dataset

The pretraining corpus spans over 30 distinct tasks, eight languages, and hundreds of thousands of hours of audio. The table below summarises the task categories and their approximate sizes.

Audio TypeTaskDescriptionHours
SpeechASRAutomatic speech recognition (multiple languages)30k
S2TTSpeech-to-text translation3.7k
OSROverlapped speech recognition<1k
Dialect ASRAutomatic dialect speech recognition2k
SRWT (EN)English speech recognition with word-level timestamps10k
SRWT (ZH)Mandarin speech recognition with word-level timestamps11k
DIDDialect identification2k
LIDSpoken language identification11.7k
SGCSpeaker gender classification4.8k
EREmotion recognition<1k
SVSpeaker verification1.2k
SDSpeaker diarization<1k
SERSpeech entity recognition<1k
KSKeyword spotting<1k
ICIntent classification<1k
SFSlot filling<1k
SAPSpeaker age prediction4.8k
VSCVocal sound classification<1k
SoundAACAutomatic audio captioning8.4k
SECSound event classification5.4k
ASCAcoustic scene classification<1k
SEDSound event detection with timestamps<1k
AQAAudio question answering<1k
Music & SongSIDSinger identification<1k
SMERSinger and music emotion recognition<1k
MCMusic captioning25k
MICMusic instrument classification<1k
MNAMusic note analysis (pitch, velocity)<1k
MGRMusic genre recognition9.5k
MRMusic recognition<1k
MQAMusic question answering<1k

Evaluation datasets are rigorously excluded from training to prevent data leakage. In total, the pretraining corpus represents tens of thousands of hours of labelled audio, making Qwen-Audio one of the largest-scale multi-type audio pretraining efforts to date.

Speech Recognition with Word-Level Timestamps (SRWT)

A distinctive and novel aspect of Qwen-Audio's training is the inclusion of the SRWT task. Previous multi-task audio systems either omit timestamps entirely or predict only coarse sentence-level timestamps (as in Whisper). Qwen-Audio trains the model to interleave word-level start and end timestamps with the transcription tokens: for each word $w_i$, the output sequence contains $\langle t^{\text{start}}_i \rangle$, $w_i$, $\langle t^{\text{end}}_i \rangle$ in that order. This requires the model to maintain precise temporal alignment between audio frames and linguistic units.

The motivation is twofold. First, fine-grained temporal grounding inherently forces the model to learn better audio-text alignment, which is beneficial even when timestamps are not needed in the final output. Second, SRWT enables downstream grounding-based QA scenarios in Qwen-Audio-Chat — for example, identifying the time interval during which a person's name is spoken, or verifying whether a particular sound event occurs in an audio clip (audio event detection is a special case of event-timestamp prediction, since absence of a timestamp implies absence of the event).

Critically, the SRWT task shares the same audio data as the standard ASR task; incorporating it therefore does not require any additional audio collection. Only the label format changes.

Supervised Fine-Tuning: Qwen-Audio-Chat

Building on the pretrained Qwen-Audio backbone, Qwen-Audio-Chat is produced via supervised fine-tuning (SFT) on approximately 20k instruction-following examples. During SFT, the audio encoder weights are frozen and only the LLM weights are updated.

The SFT data is constructed from three sources: (1) manually written demonstrations converting raw dataset labels into question-answer format; (2) GPT-3.5-generated additional questions and answers conditioned on the raw text labels; and (3) a multi-audio dialogue dataset created through manual annotation, model generation, and strategy concatenation, incorporating reasoning, story generation, and multi-audio comprehension examples.

To handle multiple simultaneous audio inputs, the convention "Audio <id>:" labels each audio in order of appearance in the dialogue. The dialogue format follows the ChatML convention, marking each turn with <im_start> and <im_end> special tokens. Training supervises only the assistant response tokens (answers and special tokens) and not the role names or user prompts, ensuring the model learns to generate accurate responses without memorising the prompt template. An example of the SFT data format is shown below:

<im_start>user
Audio 1: <audio>emov-db/141-168-0155.wav</audio>what does the speaker say?<im_end>

<im_start>assistant
The speaker says in English, "Won't you draw up, gentlemen."<im_end>

<im_start>user
What's the mood of the person?<im_end>

<im_start>assistant
Based on the voice, the mood of the person is disgusted.<im_end>
Demo examples of Qwen-Audio-Chat showing multiple-audio analysis, sound understanding and reasoning, music appreciation, and tool usage for speech editing.
Examples of Qwen-Audio-Chat showcasing its proficiency in perceiving and comprehending various types of audio. The model supports multiple-audio analysis, sound understanding and reasoning, music appreciation, and tool usage for speech editing.

Training Configuration

Both training stages use AdamW with $\beta_1 = 0.9$, $\beta_2 = 0.98$, $\epsilon = 10^{-6}$, weight decay 0.05, and gradient clipping at 1.0. Training is performed in bfloat16 with optimizer sharding. Key hyperparameters are summarised below:

ConfigurationMulti-task Pre-trainingSupervised Fine-tuning
Audio encoder init.Whisper-large-v2Qwen-Audio (stage 1)
LLM init.Qwen-7B (frozen)Qwen-7B (trainable)
Peak learning rate$5 \times 10^{-5}$$1 \times 10^{-5}$
Minimum learning rate$1 \times 10^{-5}$$1 \times 10^{-6}$
LR scheduleCosine decayCosine decay
Training steps500k8k
Warm-up steps20003k
Global batch size120128
Gradient accumulation18
Audio encoder LR decay0.950 (frozen)
Model parallelismNone2-way

Experiments and Results

Evaluation Benchmarks

Qwen-Audio is evaluated on 12 datasets spanning 8 task types — all held out from training:

  • ASR: Librispeech (dev-clean, dev-other, test-clean, test-other); Aishell1 (dev, test); Aishell2 (Mic, iOS, Android) — metric: WER
  • S2TT: CoVoST2 (7 translation directions: en↔de, en↔zh, zh↔en, es→en, fr→en, it→en) — metric: BLEU (sacrebleu)
  • SRWT: Industrial test set — metric: Average Absolute Score (AAS, in ms)
  • AAC: Clotho (test) — metrics: CIDEr, SPICE, SPIDEr
  • ASC: CochlScene (test); TUT2017 (eval) — metric: Accuracy
  • SER: MELD (test) — metric: Accuracy
  • AQA: ClothoAQA (test) — metrics: overall Accuracy and binary Accuracy
  • VSC: VocalSound (test) — metric: Accuracy
  • MNA: NSynth Qualities (MAP); NSynth Instrument (Accuracy)

Automatic Speech Recognition

On Librispeech, Qwen-Audio achieves WERs of 1.79 / 4.00 / 2.04 / 4.19 on dev-clean, dev-other, test-clean, and test-other, respectively — outperforming SpeechT5 (2.1/5.5/2.4/5.8), SLM-FT (−/−/2.6/5.0), and SALMONN (−/−/2.1/4.9) without any task-specific fine-tuning.

On Aishell1, Qwen-Audio achieves 1.22% / 1.29% WER on dev/test — state-of-the-art, surpassing MMSpeech-large (1.6/1.9) and Paraformer-large (−/2.0). On Aishell2, Qwen-Audio achieves 3.3/3.1/3.3 WER across the three microphone conditions, competitive with Paraformer-large (−/2.9/−).

Speech-to-Text Translation

On CoVoST2, Qwen-Audio substantially outperforms all baselines across all seven directions. Selected BLEU scores: en→de: 25.1 (vs. SALMONN 18.6, BLSP 14.1); de→en: 33.9 (vs. SpeechLLaMA 27.1); en→zh: 41.5 (vs. SALMONN 33.1); zh→en: 15.7 (vs. SpeechLLaMA 12.3); es→en: 39.7, fr→en: 38.5, it→en: 36.0 (vs. SpeechLLaMA 27.9/25.2/25.9).

Automatic Audio Captioning

On the Clotho test set, Qwen-Audio outperforms Pengi: CIDEr 0.441 vs. 0.416; SPICE 0.136 vs. 0.126; SPIDEr 0.288 vs. 0.271.

Speech Recognition with Word-Level Timestamps

On the industrial test set evaluated by Average Absolute Score (AAS, lower is better), Qwen-Audio achieves 51.5 ms — better than Force-aligner (60.3 ms, which has access to ground-truth transcripts) and Paraformer-large-TP (65.3 ms, which like Qwen-Audio must jointly predict transcription and timestamps).

Acoustic Scene Classification

Qwen-Audio achieves 0.795 accuracy on CochlScene (vs. the dataset-specific model at 0.669 — a +12.6 point improvement) and 0.649 accuracy on TUT2017 (vs. Pengi 0.353 — nearly doubling the score).

Speech Emotion Recognition

On MELD, Qwen-Audio achieves 0.557 accuracy, edging out WavLM-large (0.542).

Audio Question Answering

On ClothoAQA, Qwen-Audio achieves state-of-the-art results: overall accuracy 0.579 (vs. ClothoAQA baseline 0.542) and binary accuracy 0.749 (vs. Pengi 0.645).

Vocal Sound Classification

On VocalSound, Qwen-Audio achieves 0.9289 accuracy — dramatically outperforming CLAP (0.4945) and Pengi (0.6035), with an improvement of more than 32 percentage points over the previous best.

Music Note Analysis

On NSynth Qualities (MAP), Qwen-Audio achieves 0.4742 vs. Pengi 0.3860. On NSynth Instrument classification (accuracy), Qwen-Audio achieves 0.7882 vs. Pengi 0.5007.

Ablation Studies

Effect of SRWT on ASR

Removing the SRWT task from pretraining while holding all other tasks constant degrades ASR performance across all Librispeech and Aishell1 splits:

MethodLS dev-cleanLS dev-otherLS test-cleanLS test-otherAISHELL1 devAISHELL1 test
w/o SRWT1.934.182.224.211.541.71
Qwen-Audio (full)1.794.002.044.191.221.29

The improvement is especially pronounced on Aishell1 (1.54→1.22 dev; 1.71→1.29 test), suggesting that fine-grained temporal alignment learning particularly benefits tonal language recognition.

Effect of SRWT on Audio Question Answering

SRWT also benefits QA tasks beyond speech — including natural-sound QA and music QA — demonstrating that temporal grounding generalises across audio modalities:

MethodClothoAQA testClothoAQA test-binaryMusicAVQA audio-question
w/o SRWT0.56480.74180.7027
Qwen-Audio (full)0.57950.74910.7211

The authors interpret this as SRWT providing a cross-modal grounding signal that helps the model identify when and where specific audio events occur, which is essential for answering temporal questions about natural sounds and music.

Qwen-Audio-Chat: Interactive Dialogue Capabilities

Demo examples illustrating Qwen-Audio-Chat conversational scenarios including multi-audio analysis, reasoning about sounds, music appreciation, and speech editing tool usage.
Qwen-Audio-Chat supports multiple-audio analysis, sound understanding and reasoning, music appreciation, and tool usage for speech editing within a conversational multi-turn interface.

Qwen-Audio-Chat extends the pretrained model with instruction-following capabilities via 20k SFT examples. Key capabilities include:

  • Multi-audio input: Multiple audio files can be presented in a single conversation, each labelled by its ordinal index.
  • Multi-turn dialogue: The model maintains conversational context across turns, enabling follow-up questions about the same audio.
  • Reasoning and explanation: The model can explain why a given emotion, scene, or event was detected.
  • Cross-modal grounding QA: Users can ask time-anchored questions such as "at what time does the door slam?" — enabled by SRWT training.
  • Tool usage: The model can issue commands to external speech-editing tools.
  • Pure-text fallback: The combined use of audio-centric SFT data and pure-text instruction data ensures the model handles text-only turns gracefully without degrading language ability.

Stated Contributions and Novelty

  1. Universal audio-language model at scale: Qwen-Audio is the first open-source model to jointly handle human speech, natural sounds, music, and songs in a single encoder-decoder system, covering more than 30 tasks across eight languages.
  2. Hierarchical tag framework for multi-task training: A principled format that uses shared tags to encourage knowledge transfer and task-specific tags to prevent one-to-many interference — extending and generalising the Whisper multi-task template to a far broader set of audio domains.
  3. SRWT as a universal grounding auxiliary task: Demonstrating that word-level timestamp prediction, typically treated as a speech-specific utility, improves performance on ASR, natural-sound QA, and music QA — establishing it as a broadly beneficial auxiliary objective in audio-language pretraining.
  4. State-of-the-art zero-shot results: Without any task-specific fine-tuning, Qwen-Audio achieves top results on Aishell1, CochlScene, ClothoAQA, and VocalSound, and competitive or leading numbers on all other evaluated benchmarks.
  5. Qwen-Audio-Chat: An open-source instruction-following model enabling rich human-audio interaction through multi-turn dialogue with mixed audio and text inputs.

Limitations and Discussion

The paper does not explicitly enumerate limitations in a dedicated section, but several implicit constraints can be identified from the methodology:

  • Fixed audio length: The Whisper-inherited preprocessing pipeline encodes fixed-length mel-spectrogram windows. Very long audio may require chunking strategies not described in the paper.
  • Single encoder for all modalities: While the use of a single encoder simplifies the architecture and enables cross-modal transfer, it may impose a representational bottleneck compared to specialised encoders for each audio type. The use of SALMONN-style dual encoders is a competing approach whose tradeoffs are not ablated.
  • Frozen LLM during pretraining: The decision to freeze Qwen-7B during stage 1 and only update the audio encoder preserves language capabilities but potentially limits the depth of audio-language integration. The 20k SFT corpus is relatively small for a model of this capability level.
  • Evaluation coverage: Music and song understanding tasks are represented by fewer held-out benchmarks than speech tasks; the reported music results (NSynth) are somewhat narrow compared to the diversity of music tasks in training.
  • No audio generation: Qwen-Audio is a text-output model only; it does not generate audio, limiting its applicability to full speech-in / speech-out dialogue systems.

Conclusion

Qwen-Audio presents a compelling demonstration that a single large-scale audio-language model can achieve state-of-the-art or highly competitive performance across a remarkably diverse set of audio understanding tasks — spanning automatic speech recognition in multiple languages, speech translation, audio captioning, acoustic scene and emotion classification, question answering, vocal sound classification, and music note analysis — all without task-specific fine-tuning. The key technical contributions are: (a) the hierarchical multi-task tag framework that enables clean co-training across 30+ heterogeneous tasks; (b) the identification of SRWT as a broadly beneficial temporal grounding auxiliary task; and (c) the demonstration that Whisper's encoder representations, despite being trained only for ASR/translation, carry sufficient information to support music, natural-sound, and emotion tasks when connected to a powerful LLM decoder. The resulting Qwen-Audio-Chat model further shows that 20k instruction examples suffice to unlock flexible, multi-turn, multi-audio conversational interaction grounded in these pretrained capabilities.

Code & Implementation

Repository Overview

The Qwen-Audio repository provides PyTorch implementations of the multi-task audio-language model and its chat variant. Pre-trained model checkpoints are released on ModelScope and Hugging Face (announced Nov. 2023); the repo itself contains the core model architecture, audio processing pipeline, and evaluation scripts.

Key Components

  • Audio Encoder & Feature Extraction: audio.py handles mel-spectrogram computation (16 kHz, 80 Mel filters, 30-second chunks) using librosa-compatible filtering, and provides audio loading via FFmpeg. It implements log_mel_spectrogram(), pad_or_trim(), and the multi-head attention mechanisms used by the audio encoder.
  • Language Model Architecture: modeling_qwen.py defines the main Qwen-Audio model (inheriting from Qwen-7B LLM backbone) with support for flash-attention optimization, rotary embeddings, and quantization-aware caching. Includes generation utilities in qwen_generation_utils.py for multi-turn chat.
  • Tokenization & Config: tokenization_qwen.py, configuration_qwen.py, and base_generation_config.json / chat_generation_config.json configure the tokenizer and model hyperparameters.
  • Evaluation Suite: eval_audio/ folder contains benchmark scripts for 12 tasks (ASR, audio captioning, emotion recognition, scene classification, etc.) using standard metrics (WER, BLEU, etc.).

Paper–Code Mapping

The paper's core contribution—a multi-task training framework with hierarchical tag conditioning to avoid one-to-many interference across 30+ audio understanding tasks—is realized via the unified model architecture in modeling_qwen.py, which accepts tag-conditioned prompts during pre-training and inference. The audio encoder (Whisper-large-v2 initialization) processes diverse audio types through audio.py's spectrogram pipeline. Qwen-Audio-Chat instruction fine-tuning is implemented via generation configuration and chat utilities, enabling multi-turn dialogue without task-specific fine-tuning.