Repository navigation
What's New
π Qwen Live SDK β Realtime WebSocket Conversation API (#290)
A brand-new SDK for building realtime voice conversations with Qwen over WebSocket. The entry point is QwenLiveConversation, which manages a single-connect WebSocket lifecycle with full session management.
Core classes (package com.alibaba.dashscope.audio.live):
QwenLiveConversationβ WebSocket session withconnect(),close(),cancel(), andawaitSessionClosed()semanticsQwenLiveConnectionParamβ Connection configuration (API key, model, endpoint); readsDASHSCOPE_WEBSOCKET_QWEN_LIVE_BASE_URLenv overrideQwenLiveSessionConfigβ Session-level configuration (turn detection, input/output modalities, etc.)QwenLiveResponsesConfigβ Model response configurationQwenLiveCallback/QwenLiveCallbackDispatcherβ Unified event callbacks with optional ordered async dispatchQwenLiveContext/QwenLiveContextCompactionβ Context and context compaction supportQwenLiveDelegation/QwenLiveDelegationTypeβ Client and responses delegation
Key features:
- Byte array (
byte[]) audio input support - Unified
onErrorcallback with optional ordered async dispatch - Guaranteed single
onClosecallback β transport failures during close now deliver the requested close code correctly - Dedicated WebSocket endpoint (no longer shares the Omni base URL)
Samples: QwenLiveQuickStart.java, QwenLiveUsage.java
π§ Voice Enrollment β Base64 Audio Support
VoiceEnrollmentService now supports base64-encoded audio input for voice cloning, in addition to existing audio formats.
π Bug Fixes
close()now always completes with exactly oneonClosecallback; socket cancellation during close frame rejection no longer causes missed callbacks- Transport failures during a pending close now correctly deliver the requested close code instead of being silently dropped