Audio-Text-to-Text
Transformers
Safetensors
English
Chinese
moss_transcribe_diarize
text-generation
moss
audio
speech
asr
diarization
timestamp-asr
long-form-audio
multimodal
multilingual
custom_code
Eval Results
Instructions to use OpenMOSS-Team/MOSS-Transcribe-Diarize with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/MOSS-Transcribe-Diarize with Transformers:
# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/MOSS-Transcribe-Diarize", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
new
#14
by ANAS12345Nouri - opened
README.md
CHANGED
|
@@ -18,7 +18,7 @@ tags:
|
|
| 18 |
pipeline_tag: audio-text-to-text
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# MOSS-Transcribe-Diarize
|
| 22 |
|
| 23 |
<div align="center">
|
| 24 |
<a href="https://github.com/OpenMOSS/MOSS-Transcribe-Diarize"><img src="https://img.shields.io/badge/GitHub-OpenMOSS%2FMOSS--Transcribe--Diarize-black?logo=github"></a>
|
|
@@ -28,14 +28,12 @@ pipeline_tag: audio-text-to-text
|
|
| 28 |
|
| 29 |
MOSS-Transcribe-Diarize 0.9B is an end-to-end audio understanding model for long-form multi-speaker transcription, diarization, timestamps, and acoustic event awareness.
|
| 30 |
|
| 31 |
-
It supports transcription and diarization across
|
| 32 |
|
| 33 |
Given an audio or video file, the model generates a compact speaker-aware transcript in one pass, including timestamps and anonymous speaker labels such as `[S01]`, `[S02]`, and beyond.
|
| 34 |
|
| 35 |
## News
|
| 36 |
|
| 37 |
-
* 2026-07-22: The subtitle Web UI now supports both Simplified Chinese and English.
|
| 38 |
-
* 2026-07-14: 🏆 MOSS-Transcribe-Diarize won first place in the [2nd MLC-SLM Challenge](https://www.nexdata.ai/competition/mlc-slm) at INTERSPEECH 2026, spanning 14 languages (English, French, German, Italian, Portuguese, Spanish, Japanese, Korean, Russian, Thai, Vietnamese, Tagalog, Urdu, Turkish).
|
| 39 |
* 2026-07-09: Released MOSS-Transcribe-Diarize 0.9B.
|
| 40 |
|
| 41 |
## Contents
|
|
@@ -46,6 +44,7 @@ Given an audio or video file, the model generates a compact speaker-aware transc
|
|
| 46 |
- [Quickstart](#quickstart)
|
| 47 |
- [Environment Setup](#environment-setup)
|
| 48 |
- [Python Usage](#python-usage)
|
|
|
|
| 49 |
- [Serve with vLLM and SGLang](#serve-with-vllm-and-sglang)
|
| 50 |
- [Subtitle Web App](#subtitle-web-app)
|
| 51 |
- [Output Format](#output-format)
|
|
@@ -71,6 +70,14 @@ Core capabilities:
|
|
| 71 |
<img src="Model_Architecture.png" alt="MOSS-Transcribe-Diarize 0.9B model architecture" width="900">
|
| 72 |
</p>
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
This Hugging Face repository includes the custom Transformers remote code required to load the model with `trust_remote_code=True`.
|
| 76 |
|
|
@@ -146,7 +153,7 @@ We evaluate MOSS-Transcribe-Diarize using three objective metrics: Character Err
|
|
| 146 |
<td><u>6.36</u></td><td><u>12.76</u></td><td>6.40</td>
|
| 147 |
</tr>
|
| 148 |
<tr>
|
| 149 |
-
<td style="white-space: nowrap;"><
|
| 150 |
<td><b>13.78</b></td><td><b>14.02</b></td><td><b>0.24</b></td>
|
| 151 |
<td><b>18.22</b></td><td><b>13.94</b></td><td><b>-4.27</b></td>
|
| 152 |
<td><b>4.46</b></td><td><b>6.97</b></td><td><u>2.51</u></td>
|
|
@@ -245,9 +252,37 @@ To add hotwords, append a short hint to the default prompt:
|
|
| 245 |
|
| 246 |
More prompt recipes are available in the GitHub repository: <https://github.com/OpenMOSS/MOSS-Transcribe-Diarize/blob/main/examples/prompts.md>
|
| 247 |
|
| 248 |
-
### Serve with
|
| 249 |
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
```bash
|
| 253 |
hf download OpenMOSS-Team/MOSS-Transcribe-Diarize
|
|
@@ -273,6 +308,27 @@ curl -X POST http://localhost:8000/v1/audio/transcriptions \
|
|
| 273 |
-F response_format=verbose_json
|
| 274 |
```
|
| 275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
For longer multi-speaker audio, raise `max_new_tokens` so the decoder can finish the full diarized transcript:
|
| 277 |
|
| 278 |
```bash
|
|
@@ -283,35 +339,37 @@ curl -X POST http://localhost:8000/v1/audio/transcriptions \
|
|
| 283 |
-F max_new_tokens=65536
|
| 284 |
```
|
| 285 |
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
``
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
```
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
|
|
|
|
|
|
| 315 |
|
| 316 |
### Subtitle Web App
|
| 317 |
|
|
|
|
| 18 |
pipeline_tag: audio-text-to-text
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# MOSS-Transcribe-Diarize
|
| 22 |
|
| 23 |
<div align="center">
|
| 24 |
<a href="https://github.com/OpenMOSS/MOSS-Transcribe-Diarize"><img src="https://img.shields.io/badge/GitHub-OpenMOSS%2FMOSS--Transcribe--Diarize-black?logo=github"></a>
|
|
|
|
| 28 |
|
| 29 |
MOSS-Transcribe-Diarize 0.9B is an end-to-end audio understanding model for long-form multi-speaker transcription, diarization, timestamps, and acoustic event awareness.
|
| 30 |
|
| 31 |
+
It supports transcription and diarization across 50+ languages.
|
| 32 |
|
| 33 |
Given an audio or video file, the model generates a compact speaker-aware transcript in one pass, including timestamps and anonymous speaker labels such as `[S01]`, `[S02]`, and beyond.
|
| 34 |
|
| 35 |
## News
|
| 36 |
|
|
|
|
|
|
|
| 37 |
* 2026-07-09: Released MOSS-Transcribe-Diarize 0.9B.
|
| 38 |
|
| 39 |
## Contents
|
|
|
|
| 44 |
- [Quickstart](#quickstart)
|
| 45 |
- [Environment Setup](#environment-setup)
|
| 46 |
- [Python Usage](#python-usage)
|
| 47 |
+
- [Custom Prompt and Hotwords](#custom-prompt-and-hotwords)
|
| 48 |
- [Serve with vLLM and SGLang](#serve-with-vllm-and-sglang)
|
| 49 |
- [Subtitle Web App](#subtitle-web-app)
|
| 50 |
- [Output Format](#output-format)
|
|
|
|
| 70 |
<img src="Model_Architecture.png" alt="MOSS-Transcribe-Diarize 0.9B model architecture" width="900">
|
| 71 |
</p>
|
| 72 |
|
| 73 |
+
| Component | Specification |
|
| 74 |
+
|---|---|
|
| 75 |
+
| Text backbone | Qwen3-0.6B style causal decoder |
|
| 76 |
+
| Audio encoder | Whisper-Medium encoder configuration |
|
| 77 |
+
| Audio frontend | `WhisperFeatureExtractor`, 16 kHz, 80 mel bins, 30 s chunks |
|
| 78 |
+
| Audio-text bridge | 4x temporal merge + MLP adaptor |
|
| 79 |
+
| Fusion | Audio features replace <code><|audio_pad|></code> embeddings via `masked_scatter` |
|
| 80 |
+
| Output format | Compact `[start][Sxx]text[end]` transcript with speaker tags such as `[S01]` |
|
| 81 |
|
| 82 |
This Hugging Face repository includes the custom Transformers remote code required to load the model with `trust_remote_code=True`.
|
| 83 |
|
|
|
|
| 153 |
<td><u>6.36</u></td><td><u>12.76</u></td><td>6.40</td>
|
| 154 |
</tr>
|
| 155 |
<tr>
|
| 156 |
+
<td style="white-space: nowrap;"><b>MOSS Transcribe Diarize Pro</b></td>
|
| 157 |
<td><b>13.78</b></td><td><b>14.02</b></td><td><b>0.24</b></td>
|
| 158 |
<td><b>18.22</b></td><td><b>13.94</b></td><td><b>-4.27</b></td>
|
| 159 |
<td><b>4.46</b></td><td><b>6.97</b></td><td><u>2.51</u></td>
|
|
|
|
| 252 |
|
| 253 |
More prompt recipes are available in the GitHub repository: <https://github.com/OpenMOSS/MOSS-Transcribe-Diarize/blob/main/examples/prompts.md>
|
| 254 |
|
| 255 |
+
### Serve with vLLM and SGLang
|
| 256 |
|
| 257 |
+
MOSS-Transcribe-Diarize supports vLLM serving through the OpenAI-compatible transcription API. Use a pinned vLLM nightly build that includes the MOSS-Transcribe-Diarize model registration. Choose one of the following commands: for CUDA 12 environments, use `cu129`; for CUDA 13 environments, use `cu130`.
|
| 258 |
+
|
| 259 |
+
```bash
|
| 260 |
+
uv pip install -U vllm \
|
| 261 |
+
--torch-backend=auto \
|
| 262 |
+
--extra-index-url https://wheels.vllm.ai/68b4a1d582818e67adc903bf1b8fc5a5447da2fa/cu129
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
or:
|
| 266 |
+
|
| 267 |
+
```bash
|
| 268 |
+
uv pip install -U vllm \
|
| 269 |
+
--torch-backend=auto \
|
| 270 |
+
--extra-index-url https://wheels.vllm.ai/68b4a1d582818e67adc903bf1b8fc5a5447da2fa/cu130
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
```bash
|
| 274 |
+
vllm serve OpenMOSS-Team/MOSS-Transcribe-Diarize --trust-remote-code
|
| 275 |
+
```
|
| 276 |
+
|
| 277 |
+
```bash
|
| 278 |
+
curl http://localhost:8000/v1/audio/transcriptions \
|
| 279 |
+
-F model="OpenMOSS-Team/MOSS-Transcribe-Diarize" \
|
| 280 |
+
-F file=@"audio.wav" \
|
| 281 |
+
-F response_format="json" \
|
| 282 |
+
-F temperature="0"
|
| 283 |
+
```
|
| 284 |
+
|
| 285 |
+
The recommended way to serve MOSS-Transcribe-Diarize is [SGLang Omni](https://github.com/sgl-project/sglang-omni) through the OpenAI-compatible `/v1/audio/transcriptions` endpoint. Install `sglang-omni` by following the [installation guide](https://github.com/sgl-project/sglang-omni/blob/main/docs/get_started/installation.md), then download the model:
|
| 286 |
|
| 287 |
```bash
|
| 288 |
hf download OpenMOSS-Team/MOSS-Transcribe-Diarize
|
|
|
|
| 308 |
-F response_format=verbose_json
|
| 309 |
```
|
| 310 |
|
| 311 |
+
```python
|
| 312 |
+
import requests
|
| 313 |
+
|
| 314 |
+
with open("audio.wav", "rb") as f:
|
| 315 |
+
resp = requests.post(
|
| 316 |
+
"http://localhost:8000/v1/audio/transcriptions",
|
| 317 |
+
data={
|
| 318 |
+
"model": "OpenMOSS-Team/MOSS-Transcribe-Diarize",
|
| 319 |
+
"response_format": "verbose_json",
|
| 320 |
+
},
|
| 321 |
+
files={"file": ("audio.wav", f, "audio/wav")},
|
| 322 |
+
timeout=300,
|
| 323 |
+
)
|
| 324 |
+
|
| 325 |
+
resp.raise_for_status()
|
| 326 |
+
payload = resp.json()
|
| 327 |
+
print(payload["text"])
|
| 328 |
+
for segment in payload.get("segments", []):
|
| 329 |
+
print(f"[{segment['start']:.2f}-{segment['end']:.2f}] {segment['text']}")
|
| 330 |
+
```
|
| 331 |
+
|
| 332 |
For longer multi-speaker audio, raise `max_new_tokens` so the decoder can finish the full diarized transcript:
|
| 333 |
|
| 334 |
```bash
|
|
|
|
| 339 |
-F max_new_tokens=65536
|
| 340 |
```
|
| 341 |
|
| 342 |
+
| Parameter | Type | Default | Description |
|
| 343 |
+
|---|---|---|---|
|
| 344 |
+
| `file` | file | required | Audio file uploaded as multipart form data |
|
| 345 |
+
| `model` | string | server default | Model identifier |
|
| 346 |
+
| `language` | string | unset | Optional language hint |
|
| 347 |
+
| `response_format` | string | `json` | `json`, `verbose_json`, or `text` |
|
| 348 |
+
| `temperature` | float | model default (`0.0`) | Sampling temperature |
|
| 349 |
+
| `max_new_tokens` | int | `5120` | Max generated tokens; raise for long audio, for example `65536` |
|
| 350 |
+
| `prompt` | string | unset | Optional instruction override; omit to use the built-in transcribe+diarize prompt |
|
| 351 |
+
|
| 352 |
+
For benchmarking, performance numbers, and implementation details, see the [SGLang Omni cookbook](https://github.com/sgl-project/sglang-omni/blob/main/docs/cookbook/moss_transcribe_diarize.md). The following single-H100 results are reported for short- and long-sequence multi-speaker ASR tasks.
|
| 353 |
+
|
| 354 |
+
`movies` short-sequence ASR:
|
| 355 |
+
|
| 356 |
+
| Concurrency | Throughput (req/s) | Mean latency (s) | RTF mean | audio_s/s |
|
| 357 |
+
|---:|---:|---:|---:|---:|
|
| 358 |
+
| 1 | 2.57 | 0.388 | 0.0612 | 29.76 |
|
| 359 |
+
| 2 | 4.89 | 0.409 | 0.0659 | 56.55 |
|
| 360 |
+
| 4 | 6.62 | 0.513 | 0.0790 | 76.64 |
|
| 361 |
+
| 8 | 6.80 | 0.533 | 0.0810 | 78.70 |
|
| 362 |
+
| 16 | 7.08 | 0.659 | 0.0922 | 81.98 |
|
| 363 |
+
|
| 364 |
+
`aishell4_long` long-sequence ASR:
|
| 365 |
+
|
| 366 |
+
| Concurrency | Throughput (req/s) | Mean latency (s) | RTF mean | audio_s/s |
|
| 367 |
+
|---:|---:|---:|---:|---:|
|
| 368 |
+
| 1 | 0.022 | 45.2 | 0.0197 | 50.64 |
|
| 369 |
+
| 2 | 0.032 | 60.7 | 0.0265 | 74.25 |
|
| 370 |
+
| 4 | 0.036 | 105.6 | 0.0461 | 81.64 |
|
| 371 |
+
| 8 | 0.040 | 172.6 | 0.0754 | 90.62 |
|
| 372 |
+
| 16 | 0.043 | 282.8 | 0.1237 | 98.83 |
|
| 373 |
|
| 374 |
### Subtitle Web App
|
| 375 |
|