Views
No views yet


AutoModel.from_pretrained with trust_remote_code=True — no custom package installation required.| 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 |
1pip install transformers>=4.57.1 torch torchaudio soundfile accelerate
2
3# Optional
4pip install speechbrain # for TTS with speaker voice conditioning
5pip install gradio # for Gradio demopip install raon needed.1from transformers import AutoConfig
2from transformers.dynamic_module_utils import get_class_from_dynamic_module
3
4MODEL_ID = "KRAFTON/Raon-Speech-9B"
5
6_cfg = AutoConfig.from_pretrained(MODEL_ID, trust_remote_code=True)
7RaonPipeline = get_class_from_dynamic_module(
8 "modeling_raon.RaonPipeline",
9 MODEL_ID,
10 revision=getattr(_cfg, "_commit_hash", None),
11)
12del _cfg
13
14pipe = RaonPipeline(MODEL_ID, device="cuda", dtype="bfloat16")1git clone https://github.com/krafton-ai/Raon-Speech.git
2cd Raon-Speech/raon
3pip install -e . # or: uv sync1from raon import RaonPipeline
2
3# From Hub (local code + Hub weights)
4pipe = RaonPipeline("KRAFTON/Raon-Speech-9B")
5
6# From local path
7pipe = RaonPipeline("/path/to/raon-model")text = pipe.stt("audio.wav")1# Without speaker conditioning
2audio, sr = pipe.tts("Hello, how are you?")
3pipe.save_audio((audio, sr), "output.wav")
4
5# With speaker conditioning (requires speechbrain)
6audio, sr = pipe.tts("Hello, how are you?", speaker_audio="speaker_ref.wav")answer = pipe.textqa("What is the speaker saying?", audio="audio.wav")answer = pipe.speech_chat("question.wav")1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "audio", "audio": "audio.wav"},
6 {"type": "text", "text": "Transcribe and summarise this audio."},
7 ],
8 },
9]
10response = pipe.chat(messages)1git clone https://github.com/krafton-ai/vllm-omni.git
2cd vllm-omni
3docker build -f docker/Dockerfile.ci -t vllm-omni .1docker run --rm --gpus all \
2 --shm-size=16g \
3 -p 8000:8000 \
4 vllm-omni \
5 bash -c "vllm serve KRAFTON/Raon-Speech-9B --omni --port 8000 --trust-remote-code"1curl -X POST http://localhost:8000/v1/audio/speech \
2 -H "Content-Type: application/json" \
3 -d '{
4 "input": "Hello, how are you?",
5 "model": "KRAFTON/Raon-Speech-9B",
6 "response_format": "wav"
7 }' --output output.wav1curl -X POST http://localhost:8000/v1/audio/speech \
2 -H "Content-Type: application/json" \
3 -d '{
4 "input": "Hello, how are you?",
5 "model": "KRAFTON/Raon-Speech-9B",
6 "ref_audio": "data:audio/wav;base64,'$(base64 -w0 speaker_ref.wav)'",
7 "task_type": "Base",
8 "response_format": "wav"
9 }' --output cloned.wav1curl -X POST http://localhost:8000/v1/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "KRAFTON/Raon-Speech-9B",
5 "messages": [
6 {
7 "role": "user",
8 "content": [
9 {"type": "audio_url", "audio_url": {"url": "data:audio/wav;base64,'"$(base64 -w0 audio.wav)"'"}},
10 {"type": "text", "text": "Transcribe the audio into text."}
11 ]
12 }
13 ]
14 }'