
Full-duplex voice conversation that keeps talking while your application runs delegated tasks, with function calling and billing by the second.
Full-duplex voice conversation that keeps talking while your application runs delegated tasks, with function calling and billing by the second.
Session is configured with session.update events over the socket rather than request parameters. A session is billed by its length, per second, at least 3 seconds.
Auch bekannt als Qwen Audio Live, Alibaba Cloud Qwen Audio 3.1 Live
qwen-audio-3-1-live/v1/realtimeqwen-audio-3.1-livealibaba/qwen-audio-3-1-liveLive Pay-as-you-go-Preise aus dem EmpirioLabs-Katalog. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen.
Qwen Audio 3.1 Live führt ein Live-Gespräch über einen WebSocket unter wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-live, nicht über die HTTP-Endpunkte. Verbinden Sie sich mit der Modell-ID qwen-audio-3-1-live und senden Sie Ihren EmpirioLabs-API-Schlüssel beim Handshake als Authorization: Bearer-Header. Audio läuft in beide Richtungen als base64-kodiertes 16-Bit-PCM. Ein Browser kann bei einem WebSocket keine Header setzen. Öffnen Sie diese Verbindung daher von Ihrem Server aus und leiten Sie das Audio über Ihren eigenen Socket an den Browser weiter. Hol dir einen API-Schlüssel im EmpirioLabs Dashboard.
import asyncio, json, os, websockets
async def main():
async with websockets.connect(
"wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-live",
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.audio.delta":
... # base64 audio chunk, append to your playback buffer
elif event["type"] == "response.done":
break
asyncio.run(main())Request-Parameter, die die Qwen Audio 3.1 Live API auf EmpirioLabs unterstützt. Standardwerte gelten, wenn ein Feld weggelassen wird.
| Parameter | Typ | Standard | Bereich / Werte | Beschreibung |
|---|---|---|---|---|
| voice | enum | yunshu | yunshu, xiaoman, wanfeng, qingyou, poxiao, maiya, wulong, xue... | Speaking voice of the qwen-audio-4.0-realtime-preview frontend, set with session.update. With qwen-audio-3.1-realtime-flash, use a voice of Qwen Audio 3.1 Realtime... |
| instructions | string | - | - | System guidance for how the model should behave and speak during the conversation. |
| model | enum | qwen-audio-4.0-realtime-preview | qwen-audio-4.0-realtime-preview, qwen-audio-3.1-realtime-flash | The voice model that holds the conversation, required in session.update. qwen-audio-4.0-realtime-preview listens while it speaks (set turn_detection to duplex);... |
| delegation | string | - | - | How delegated tasks run. {"type": "client"} hands a longer task to your application as a session.delegation.created event while the model keeps talking; return its... |
| input_audio_format | enum | pcm | pcm | Encoding of the audio you send in session.input_audio.append: base64 16-bit PCM at 16 kHz, mono. |
| output_audio_format | enum | pcm | pcm | Encoding of the audio the model streams back in session.output_audio.delta: 16-bit PCM at 24 kHz, mono. |
| turn_detection | string | {"type":"duplex"} | - | duplex with qwen-audio-4.0-realtime-preview, which listens while it speaks and can be interrupted at any moment. Leave it out with qwen-audio-3.1-realtime-flash,... |
Full-duplex voice over a WebSocket at wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-live, authenticated with the ordinary Authorization Bearer header. This model has its own event protocol, described below, rather than the OpenAI Realtime protocol.
Send one session.update and wait for session.updated. session.model is required:
Set voice, instructions and tools in the same event.
With qwen-audio-4.0-realtime-preview, choose one of the 8 voices in the voice list. With qwen-audio-3.1-realtime-flash, use a voice of Qwen Audio 3.1 Realtime Flash, or leave voice out for its default.
Send session.close and wait for session.closed, or close the socket.
When the model is at capacity, a new session receives a session_unavailable error and close code 1013. Try again shortly.
A session is billed by its length, from when it opens until it closes, in whole seconds, with a partial second counted as a full second and at least 3 seconds per session. Listening, silence and text all count as session time.
Ankündigungen, Prompt-Tests und Vergleiche, die dieses Modell abdecken.
Auf EmpirioLabs wird Qwen Audio 3.1 Live nach Verbrauch abgerechnet: Session $0.00142 per second. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen. Die Live-Preistabelle auf dieser Seite entspricht immer dem, was die API berechnet.
Qwen Audio 3.1 Live nimmt Audio, Text als Eingabe an und gibt Audio, Text aus.
Qwen Audio 3.1 Live wird über WEBSOCKET /v1/realtime auf api.empiriolabs.ai mit normaler Bearer-Token-Authentifizierung bereitgestellt.
Sende qwen-audio-3-1-live als Modell in deinem Request. Die alternativen IDs qwen-audio-3.1-live, alibaba/qwen-audio-3-1-live funktionieren ebenfalls.
Alibaba Cloud hat Qwen Audio 3.1 Live am 23. Nov. 2026 veröffentlicht.
Qwen Audio 3.1 Live auf EmpirioLabs wird aus Singapore bereitgestellt.
Öffnen Sie das EmpirioLabs Playground und klicken Sie auf Start session, um es im Browser zu testen. Qwen Audio 3.1 Live läuft über einen WebSocket statt über Anfrage und Antwort, beginnen Sie für die Integration deshalb mit dem Schnellstart für Echtzeit-Sprache. Verbinden Sie sich von Ihrem Server aus mit Ihrem EmpirioLabs-API-Schlüssel und der Modell-ID qwen-audio-3-1-live und streamen Sie dann Audio in beide Richtungen.
Erstelle ein EmpirioLabs-Konto und generiere dann einen Schlüssel unter API Keys im Dashboard. Die Abrechnung erfolgt über Pay-as-you-go-Guthaben, du zahlst also nur für deine Requests. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen.
Schauen Sie sich unsere Preise an oder kontaktieren Sie uns, wenn Sie Ihr eigenes Modell auf unserem Stack implementieren möchten.