Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions docs/user_guide/examples/online_serving/qwen3_omni.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ You can control output modalities to specify which types of output the model sho
| Modalities | Output |
|------------|--------|
| `["text"]` | Text only |
| `["audio"]` | Text + Audio |
| `["audio"]` | Audio only |
| `["text", "audio"]` | Text + Audio |
| Not specified | Text + Audio (default) |

Expand All @@ -161,13 +161,16 @@ curl http://localhost:8091/v1/chat/completions \
#### Text + Audio

```bash
curl http://localhost:8091/v1/chat/completions \
response=$(curl -s http://localhost:8091/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-Omni-30B-A3B-Instruct",
"messages": [{"role": "user", "content": "Describe vLLM in brief."}],
"modalities": ["audio"]
}'
"modalities": ["text", "audio"]
}')

echo "$response" | jq -r '.choices[0].message.content'
echo "$response" | jq -r '.choices[1].message.audio.data' | base64 -d > output.wav
```

### Using Python client
Expand Down Expand Up @@ -205,7 +208,7 @@ client = OpenAI(base_url="http://localhost:8091/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="Qwen/Qwen3-Omni-30B-A3B-Instruct",
messages=[{"role": "user", "content": "Describe vLLM in brief."}],
modalities=["audio"]
modalities=["text", "audio"]
)
# Response contains two choices: one with text, one with audio
print(response.choices[0].message.content) # Text response
Expand Down
13 changes: 8 additions & 5 deletions examples/online_serving/qwen3_omni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,16 @@ curl http://localhost:8091/v1/chat/completions \
#### Text + Audio

```bash
curl -s http://localhost:8091/v1/chat/completions \
response=$(curl -s http://localhost:8091/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-Omni-30B-A3B-Instruct",
"messages": [{"role": "user", "content": "Describe vLLM in brief."}],
"modalities": ["audio"]
}' | jq -r '.choices[0].message.audio.data' | base64 -d > output.wav
"modalities": ["text", "audio"]
}')

echo "$response" | jq -r '.choices[0].message.content'
echo "$response" | jq -r '.choices[1].message.audio.data' | base64 -d > output.wav
```

### Using Python client
Expand Down Expand Up @@ -456,8 +459,8 @@ response = client.chat.completions.create(
modalities=["audio"],
extra_body={"speaker": "chelsie"}
)
# Audio uses the specified speaker
print(response.choices[1].message.audio)
# Audio-only responses contain a single audio choice
print(response.choices[0].message.audio)
```

Supported speaker names depend on the model (e.g. `Ethan`, `Chelsie`, `Aiden`). Omit `speaker` to use the default.
Expand Down
Loading