mispeech / midashenglm-gen

huggingface.co
Total runs: 177
24-hour runs: 0
7-day runs: -12
30-day runs: -656
Model's Last Updated: August 13 2026
text-to-audio

Introduction of midashenglm-gen

Model Details of midashenglm-gen

MiDashengLM-Gen

Unified Audio Scene Generation via LLM-Driven Autoregressive Flow Matching

arXiv HuggingFace Model Demo Page GitHub

English | 中文

MiDashengLM-Gen is an end-to-end framework that uses a pre-trained Large Language Model and audio tokenizer as the backbone, combined with per-token conditional flow matching for autoregressive, variable-length mixed-audio scene generation . It generates coherent 16 kHz audio scenes that simultaneously blend speech, music, sound effects, and environmental acoustics from structured text descriptions.

Architecture

Architecture

Left: training pipeline with flow matching loss. Right: autoregressive inference pipeline.

Key components:

Component Details
Audio Tokenizer DashengTokenizer → 768-dim latents @ 25 Hz, downsampled to 5 Hz via audio projector
LLM Backbone Qwen3-1.7B, fully fine-tuned
Flow Matching DiT 16 layers, hidden dim 2048, 8 heads, MLP ratio 4.0
Inference 10-step Euler ODE solver, CFG scale 2.0
Stop Head Learned binary classifier for variable-length truncation
Output 16 kHz mono WAV, auto-truncated
Input Format

Input uses structured multi-view captions with special tokens to describe different aspects of an audio scene. Use <|unknown|> for absent elements.

Token Description Example
<|caption|> Overall scene description A comedian delivering a punchline followed by uproarious crowd laughter and an upbeat jazz band hit
<|asr|> Speech transcript And that is why I never buy cheap luggage anymore!
<|speech|> Speaker characteristics (voice, emotion, style) expressive comedic male voice
<|sfx|> Sound effects uproarious crowd laughter
<|music|> Music description sudden upbeat jazz band sting
<|env|> Environment / ambience intimate comedy club
Installation
pip install torch torchaudio "transformers>=4.51" einops safetensors soundfile tqdm numpy x-transformers
Quick Start
from transformers import AutoModel
import soundfile as sf

model = AutoModel.from_pretrained("mispeech/midashenglm-gen", trust_remote_code=True)
model = model.cuda()

result = model.generate(
    "<|caption|> A comedian delivering a punchline followed by uproarious crowd laughter and an upbeat jazz band hit "
    "<|asr|> And that is why I never buy cheap luggage anymore! "
    "<|speech|> expressive comedic male voice "
    "<|music|> sudden upbeat jazz band sting "
    "<|sfx|> uproarious crowd laughter "
    "<|env|> intimate comedy club"
)

sf.write("output.wav", result["audio"], result["sample_rate"])
Batch Generation
texts = [
    "<|caption|> A comedian delivering a punchline followed by uproarious crowd laughter and an upbeat jazz band hit <|asr|> And that is why I never buy cheap luggage anymore! <|speech|> expressive comedic male voice <|music|> sudden upbeat jazz band sting <|sfx|> uproarious crowd laughter <|env|> intimate comedy club",
    "<|caption|> Upbeat instrumental music with occasional whistling and low audio quality. <|asr|> <|unknown|> <|speech|> <|unknown|> <|sfx|> Intermittent whistling emerges in later segment alongside persistent instrumental playback. <|music|> Bright melodic composition with guitar, piano, and rhythmic percussion elements, maintaining a consistently upbeat character. <|env|> Low-fidelity recording with compressed dynamics and limited frequency response.",
]
result = model.generate(texts)
for i, audio in enumerate(result["audio"]):
    sf.write(f"output_{i}.wav", audio, result["sample_rate"])
Generation Parameters
result = model.generate(
    "...",
    eval_cfg=2.0,           # Classifier-free guidance scale
    stop_threshold=0.5,     # Stop prediction threshold
    min_stop_step=5,        # Minimum steps before stopping
    seed=42,                # Random seed for reproducibility
)
Parameter Default Description
eval_cfg 2.0 Classifier-free guidance scale
stop_threshold 0.5 Stop probability threshold for audio truncation
min_stop_step 5 Minimum generation steps before stopping
seed None Random seed for reproducibility
Citation
@article{sun2026midashenglmgen,
  title={MiDashengLM-Gen: Unified Audio Scene Generation via LLM-Driven Autoregressive Flow Matching},
  author={Sun, Xingwei and Dinkel, Heinrich and Li, Gang and Mei, Jiahao and Niu, Yadong and Han, Zerui and Jiang, Yuepeng and Zhou, Jiahao and Fan, Lichun and Luan, Jian},
  journal={arXiv preprint},
  eprint={2608.11804},
  archivePrefix={arXiv},
  year={2026}
}
License

Apache 2.0

Use Restrictions

You are solely responsible for your use of MiDashengLM-Gen and any outputs, actions, or consequences arising therefrom, and you agree not to use MiDashengLM-Gen or any derivatives thereof:

  • For any unlawful, fraudulent, or malicious purpose, or in any manner that violates any applicable laws or regulations;
  • To infringe upon the intellectual property rights, privacy rights, publicity rights, or other lawful rights or interests of any third party;
  • To exploit, harm, harass, defame, unlawfully discriminate against, or otherwise adversely affect any individual or group, including minors or vulnerable persons;
  • For any military purpose or application.

Runs of mispeech midashenglm-gen on huggingface.co

177
Total runs
0
24-hour runs
0
3-day runs
-12
7-day runs
-656
30-day runs

More Information About midashenglm-gen huggingface.co Model

More midashenglm-gen license Visit here:

https://choosealicense.com/licenses/apache-2.0

midashenglm-gen huggingface.co

midashenglm-gen huggingface.co is an AI model on huggingface.co that provides midashenglm-gen's model effect (), which can be used instantly with this mispeech midashenglm-gen model. huggingface.co supports a free trial of the midashenglm-gen model, and also provides paid use of the midashenglm-gen. Support call midashenglm-gen model through api, including Node.js, Python, http.

midashenglm-gen huggingface.co Url

https://huggingface.co/mispeech/midashenglm-gen

mispeech midashenglm-gen online free

midashenglm-gen huggingface.co is an online trial and call api platform, which integrates midashenglm-gen's modeling effects, including api services, and provides a free online trial of midashenglm-gen, you can try midashenglm-gen online for free by clicking the link below.

mispeech midashenglm-gen online free url in huggingface.co:

https://huggingface.co/mispeech/midashenglm-gen

midashenglm-gen install

midashenglm-gen is an open source model from GitHub that offers a free installation service, and any user can find midashenglm-gen on GitHub to install. At the same time, huggingface.co provides the effect of midashenglm-gen install, users can directly use midashenglm-gen installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

midashenglm-gen install url in huggingface.co:

https://huggingface.co/mispeech/midashenglm-gen

Url of midashenglm-gen

midashenglm-gen huggingface.co Url

Provider of midashenglm-gen huggingface.co

mispeech
ORGANIZATIONS

Other API from mispeech

huggingface.co

Total runs: 19.8K
Run Growth: -3.6K
Growth Rate: -18.45%
Updated:March 30 2026
huggingface.co

Total runs: 3.4K
Run Growth: -4.9K
Growth Rate: -143.19%
Updated:March 30 2026
huggingface.co

Total runs: 2.6K
Run Growth: -2.8K
Growth Rate: -107.30%
Updated:March 30 2026
huggingface.co

Total runs: 911
Run Growth: -3.2K
Growth Rate: -347.31%
Updated:March 30 2026
huggingface.co

Total runs: 388
Run Growth: -21
Growth Rate: -5.57%
Updated:March 26 2026
huggingface.co

Total runs: 62
Run Growth: 13
Growth Rate: 20.97%
Updated:March 29 2025