> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# Qwen Audio 3.1 Realtime Plus

> Duplex speech conversation over one socket, with 27 voices, native web search, tool calling, and separate text and audio token rates.

![Qwen Audio 3.1 Realtime Plus](https://media.empiriolabs.ai/model-logos/qwen.png)

[Alibaba Cloud](/providers/alibaba) · Audio Generation

`WEBSOCKET /v1/realtime`

Duplex speech conversation over one socket, with 27 voices, native web search, tool calling, and separate text and audio token rates.

## At a glance

| Field               | Value                                                                                       |
| ------------------- | ------------------------------------------------------------------------------------------- |
| Model id            | `qwen-audio-3-1-realtime-plus`                                                              |
| Model release date  | 2026-09-20                                                                                  |
| Input modalities    | Audio, Text                                                                                 |
| Output modalities   | Audio, Text                                                                                 |
| Context window      | 256K                                                                                        |
| Weight precision    | -                                                                                           |
| Max output tokens   | 16,384                                                                                      |
| Region              | Singapore                                                                                   |
| Features            | realtime, speech_to_speech, audio_in, audio_out, function_calling, web_search, multilingual |
| Native inference    | No                                                                                          |
| New                 | Yes                                                                                         |
| Supported endpoints | `WEBSOCKET /v1/realtime`                                                                    |
| Alternate model ids | `qwen-audio-3.1-realtime-plus`, `alibaba/qwen-audio-3-1-realtime-plus`                      |

## Pricing

| Charge        | Spec                          | Rate    |
| ------------- | ----------------------------- | ------- |
| Input: audio  | per 1M audio input tokens     | \$12.80 |
| Input         | per 1M prompt tokens          | \$1.60  |
| Output        | per 1M generated tokens       | \$12.80 |
| Output: audio | per 1M generated audio tokens | \$48.00 |
| Web search    | per call when invoked         | \$0.00  |

## Example request

```python
import asyncio, json, os, websockets

URL = "wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-realtime-plus"

async def main():
    async with websockets.connect(
        URL,
        additional_headers=[("Authorization", f"Bearer {os.environ['EMPIRIOLABS_API_KEY']}")],
        max_size=None,
    ) as ws:
        print(json.loads(await ws.recv())["type"])  # session.created
        await ws.send(json.dumps({
            "type": "conversation.item.create",
            "item": {"type": "message", "role": "user",
                     "content": [{"type": "input_text", "text": "Say hello."}]},
        }))
        await ws.send(json.dumps({"type": "response.create"}))
        async for raw in ws:
            event = json.loads(raw)
            if event["type"] == "response.done":
                break

asyncio.run(main())
```

## Parameters

| Parameter             | Type    | Required | Default                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------- | ------- | -------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `voice`               | enum    | no       | `"longanqian_v3.1"`                | Speaking voice for the session. Set it with session.update before the model produces any audio. These voices are specific to this model. · Allowed: `longanqian_v3.1`, `longanhuan_v3.1`, `longanlingxin_v3.1`, `longanfengyue_v3.1`, `xunanchuan_v3.1`, `beth_v3.1`, `betty_v3.1`, `cally_v3.1`, `longanqian`, `longanlingxin`, `longanlufeng`, `longanlingxi`, `longanxiaoxin`, `longanfengyue`, `longanyuanfei`, `longanhuan_v3.6`, `longjielidou_v3.6`, `longpaopao_v3.6`, `longhuohuo_v3.6`, `longchuanshu_v3.6`, `loongmary`, `loongeva_v3.6`, `loongjohn`, `daniel`, `echo`, `hannah`, `sherry` |
| `instructions`        | string  | no       | -                                  | System guidance for how the model should behave and speak during the conversation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `enable_search`       | boolean | no       | false                              | Search the web for real-time information. Cannot be used in the same session as function calling. Search results are added to the conversation and count as input tokens.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `modalities`          | string  | no       | `["text", "audio"]`                | Which output types the model returns for a turn. Drop audio for a text-only reply.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input_audio_format`  | enum    | no       | `"pcm16"`                          | Encoding of the audio you append to the input buffer: base64 16-bit PCM at 16 kHz. · Allowed: `pcm16`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `output_audio_format` | enum    | no       | `"pcm24"`                          | Encoding of the audio the model streams back: 16-bit PCM at 24 kHz. · Allowed: `pcm24`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `turn_detection`      | string  | no       | `&#123;"type": "server_vad"&#125;` | Server-side voice activity detection. Decides when you have stopped speaking and the model should reply. It is on by default on this model.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Notes

**Connecting**

Full-duplex voice over a WebSocket at `wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-realtime-plus`, authenticated with the ordinary Authorization Bearer header. Configure the session with `session.update` over the socket: voice, instructions, modalities, and turn detection.

**Sending audio**

* Append microphone audio as `input_audio_buffer.append` events.
* Voice activity detection decides when you have stopped speaking, so keep streaming for about a second after the speech ends.

**Voices**

The voices on this model are its own set. Pick one from the voice list rather than carrying a voice across from another model, or leave it unset and the default is supplied for you.

**Web search**

Web search is off by default. Turn it on with `enable_search`. It cannot be enabled in the same session as function calling, and search results are added to the conversation and count as input tokens.

**Billing**

Audio and text tokens are priced separately in both directions, and each completed turn is billed on its own from the usage the model reports.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/qwen-audio-3-1-realtime-plus`.