
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.
يعرف أيضا باسم 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-liveأسعار الدفع حسب الاستخدام مباشرة من كتالوج EmpirioLabs. يمكنك أيضًا اختيار خطة تتضمن حصص استخدام أسبوعية.
يجري Qwen Audio 3.1 Live محادثة مباشرة عبر WebSocket على wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-live، وليس عبر نقاط نهاية HTTP. اتصل باستخدام معرف النموذج qwen-audio-3-1-live وأرسل مفتاح EmpirioLabs API في ترويسة Authorization: Bearer أثناء المصافحة. ينتقل الصوت في الاتجاهين بصيغة PCM 16-بت مرمّزة بـ base64. لا يستطيع المتصفح ضبط الترويسات على WebSocket، لذا افتح هذا الاتصال من خادمك ومرّر الصوت إلى المتصفح عبر مقبسك الخاص. احصل على مفتاح API من لوحة تحكم EmpirioLabs.
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())معلمات الطلب التي تدعمها واجهة Qwen Audio 3.1 Live API على EmpirioLabs. تُطبق القيم الافتراضية عند حذف أي حقل.
| المعامل | النوع | الافتراضي | النطاق / القيم | الوصف |
|---|---|---|---|---|
| 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.
إعلانات واختبارات مطالبات ومقارنات تتناول هذا النموذج.
على EmpirioLabs، تتم فوترة Qwen Audio 3.1 Live حسب الاستخدام: Session $0.00142 per second. يمكنك أيضًا اختيار خطة تتضمن حصص استخدام أسبوعية. جدول الأسعار المباشر في هذه الصفحة يطابق دائمًا ما تحتسبه الواجهة.
يقبل Qwen Audio 3.1 Live المدخلات صوت, نص ويعيد صوت, نص.
يُقدَّم Qwen Audio 3.1 Live عبر WEBSOCKET /v1/realtime على api.empiriolabs.ai مع مصادقة Bearer القياسية.
أرسل qwen-audio-3-1-live كقيمة model في طلبك. تعمل المعرّفات البديلة qwen-audio-3.1-live, alibaba/qwen-audio-3-1-live أيضًا.
أصدرت Alibaba Cloud نموذج Qwen Audio 3.1 Live في 23 نوفمبر 2026.
يُقدَّم Qwen Audio 3.1 Live على EmpirioLabs من Singapore.
افتح Playground EmpirioLabs واضغط Start session لتجربته في المتصفح. يعمل Qwen Audio 3.1 Live عبر WebSocket بدلاً من طلب واستجابة، لذا ابدأ من دليل البدء السريع للصوت الفوري عند الدمج. اتصل من خادمك باستخدام مفتاح EmpirioLabs API ومعرف النموذج qwen-audio-3-1-live، ثم مرّر الصوت في الاتجاهين.
أنشئ حساب EmpirioLabs ثم أنشئ مفتاحًا من API Keys في لوحة التحكم. الفوترة برصيد الدفع حسب الاستخدام، فلا تدفع إلا مقابل الطلبات التي تنفذها. يمكنك أيضًا اختيار خطة تتضمن حصص استخدام أسبوعية.
تحقق من تسعيرنا أو تواصل إذا كنت ترغب في نشر نموذجك الخاص على مجموعتنا.