Any-to-Any
Transformers
Safetensors
English
Korean
raon
feature-extraction
speech
audio
multimodal
custom_code
Instructions to use KRAFTON/Raon-Speech-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KRAFTON/Raon-Speech-9B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KRAFTON/Raon-Speech-9B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 7,434 Bytes
419adf0 ef408bb 419adf0 830dbe7 419adf0 08baffa 419adf0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | ---
library_name: transformers
tags:
- speech
- audio
- multimodal
license: cc-by-nc-4.0
language:
- en
- ko
pipeline_tag: any-to-any
---
# Raon-Speech-9B
<div align="center">
<img class="block dark:hidden" src="assets/Raon-Speech-Gradient-Black.png" alt="Raon-Speech Logo" width="400">
<img class="hidden dark:block" src="assets/Raon-Speech-Gradient-White.png" alt="Raon-Speech Logo" width="400">
</div>
<p align="center">
<a href="https://www.krafton.ai/ko/"><img src="https://img.shields.io/badge/Homepage-KRAFTON%20AI-blue?style=flat&logo=google-chrome&logoColor=white" alt="Homepage"></a>
<a href="https://github.com/krafton-ai/Raon-Speech"><img src="https://img.shields.io/badge/GitHub-Raon-white?style=flat&logo=github&logoColor=black" alt="GitHub"></a>
<br>
<a href="https://huggingface.co/KRAFTON"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-KRAFTON-yellow?style=flat" alt="Hugging Face"></a>
<a href="https://x.com/Krafton_AI"><img src="https://img.shields.io/badge/X-KRAFTON%20AI-white?style=flat&logo=x&logoColor=black" alt="X"></a>
<br>
<a href="https://creativecommons.org/licenses/by-nc/4.0/"><img src="https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey?style=flat" alt="License"></a>
</p>
<p align="center">
Technical Report | Blog (Coming soon)
<!-- π <a href="https://arxiv.org/abs/YOUR_PAPER_ID">Technical Report</a> | π <a href="https://YOUR_BLOG_URL">Blog</a> -->
</p>
Raon-Speech is a 9B-parameter speech language model that supports state-of-the-art speech understanding, answering and generation in English and Korean.
This model successfully transforms a pre-trained LLM into a SpeechLM to both understand and generate speech without compromising its original language capabilities.
It trains on millions of hours of English-Korean speech-text datasets with the following training stages: (1) speech encoder-decoder alignment, (2) end-to-end SpeechLM pre-training, and (3) multi-reward DPO-based post-training.
## Key Features
- **End-to-End Speech Language Model**: 9B-parameter multimodal model built on Qwen3 (36 layers, 4096 hidden dim), Qwen3OmniMoeAudioEncoder (24 layers), Mimi codec (32 quantizers), and ECAPA-TDNN speaker encoder.
- **Bilingual Support**: State-of-the-art speech understanding, answering, and generation in both English and Korean.
- **Multi-Task Capabilities**: Supports STT (audio β text), TTS (text β audio), TextQA (text + audio β text), and SpeechChat (audio β text) in a single unified model.
- **Speaker Voice Conditioning**: TTS with optional speaker reference audio for voice cloning via ECAPA-TDNN embeddings.
- **TTS Continuation**: Generate speech that naturally continues from a reference audio, with prefill-based continuation for seamless prosody.
- **Multi-Reward DPO Post-Training**: Three-stage training pipeline β (1) speech encoder-decoder alignment, (2) end-to-end SpeechLM pre-training, and (3) multi-reward DPO-based post-training β for high-quality speech generation.
- **HuggingFace Transformers Integration**: Load and run directly via `AutoModel.from_pretrained` with `trust_remote_code=True` β no custom package installation required.
## Benchmark Results
Measured with LibriSpeech test-clean samples on single-GPU setups via streaming TTS. All values are averaged.
| Metric | RTX 6000 Pro | L40S |
|--------|-------------|------|
| **RTF** | 0.27 (3.7Γ real-time) | 0.45 (2.2Γ real-time) |
| **TTFT** | 617 ms | 887 ms |
| **TBT** | 135 ms | 233 ms |
- **RTF** (Real-Time Factor): Lower is faster. Values below 1.0 mean faster-than-real-time synthesis.
- **TTFT** (Time to First Token): Latency until the first audio chunk is returned.
- **TBT** (Time Between Tokens): Average interval between consecutive audio chunks.
## Requirements
```bash
pip install transformers>=4.57.1 torch torchaudio soundfile accelerate
# Optional
pip install speechbrain # for TTS with speaker voice conditioning
pip install gradio # for Gradio demo
```
## Quick Start
### Option 1: Load from Hub (recommended)
No `pip install raon` needed.
```python
from transformers import AutoConfig
from transformers.dynamic_module_utils import get_class_from_dynamic_module
MODEL_ID = "KRAFTON/Raon-Speech-9B"
_cfg = AutoConfig.from_pretrained(MODEL_ID, trust_remote_code=True)
RaonPipeline = get_class_from_dynamic_module(
"modeling_raon.RaonPipeline",
MODEL_ID,
revision=getattr(_cfg, "_commit_hash", None),
)
del _cfg
pipe = RaonPipeline(MODEL_ID, device="cuda", dtype="bfloat16")
```
### Option 2: With raon package installed
```bash
git clone https://github.com/krafton-ai/Raon-Speech.git
cd Raon-Speech/raon
pip install -e . # or: uv sync
```
```python
from raon import RaonPipeline
# From Hub (local code + Hub weights)
pipe = RaonPipeline("KRAFTON/Raon-Speech-9B")
# From local path
pipe = RaonPipeline("/path/to/raon-model")
```
## Tasks
#### STT (Audio β Text)
```python
text = pipe.stt("audio.wav")
```
#### TTS (Text β Audio)
```python
# Without speaker conditioning
audio, sr = pipe.tts("Hello, how are you?")
pipe.save_audio((audio, sr), "output.wav")
# With speaker conditioning (requires speechbrain)
audio, sr = pipe.tts("Hello, how are you?", speaker_audio="speaker_ref.wav")
```
#### TextQA (Text + Audio β Text)
```python
answer = pipe.textqa("What is the speaker saying?", audio="audio.wav")
```
#### SpeechChat (Audio β Text)
```python
answer = pipe.speech_chat("question.wav")
```
#### Chat (Multimodal)
```python
messages = [
{
"role": "user",
"content": [
{"type": "audio", "audio": "audio.wav"},
{"type": "text", "text": "Transcribe and summarise this audio."},
],
},
]
response = pipe.chat(messages)
```
## Deployment (vLLM-Omni)
####
# 1. Clone & Build
```bash
git clone https://github.com/krafton-ai/vllm-omni.git
cd vllm-omni
docker build -f docker/Dockerfile.ci -t vllm-omni .
```
# 2. Serve
```bash
docker run --rm --gpus all \
--shm-size=16g \
-p 8000:8000 \
vllm-omni \
bash -c "vllm serve KRAFTON/Raon-Speech-9B --omni --port 8000 --trust-remote-code"
```
# 3. Test β TTS
```bash
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, how are you?",
"model": "KRAFTON/Raon-Speech-9B",
"response_format": "wav"
}' --output output.wav
```
# 4. Test β TTS with voice cloning
```bash
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, how are you?",
"model": "KRAFTON/Raon-Speech-9B",
"ref_audio": "data:audio/wav;base64,'$(base64 -w0 speaker_ref.wav)'",
"task_type": "Base",
"response_format": "wav"
}' --output cloned.wav
```
# 5. Test β STT
```bash
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "KRAFTON/Raon-Speech-9B",
"messages": [
{
"role": "user",
"content": [
{"type": "audio_url", "audio_url": {"url": "data:audio/wav;base64,'"$(base64 -w0 audio.wav)"'"}},
{"type": "text", "text": "Transcribe the audio into text."}
]
}
]
}'
```
## License
This repository is licensed under the
[Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/).
Β© 2026 KRAFTON |