Qwen Cloud Voice Agent API client
Qwen Cloud is an advanced AI-native platform developed by Alibaba Cloud that hosts the powerful Qwen family of large language and multimodal models. Engineered specifically for complex reasoning, multilingual comprehension, and real-time interaction, Qwen Cloud serves as the backbone for next-generation AI agents. By processing and understanding context with exceptionally low latency, the platform enables enterprises to deploy sophisticated digital assistants capable of managing intricate workflows and natural human conversations across global markets.
This module provides a client interface for real-time voice conversations with Qwen Cloud (over WebSocket). Input audio is PCM 16 kHz. Response audio is PCM 24 kHz on the provider side and is delivered to the scenario as media. Learn more about the Qwen-Audio Realtime API.
The backend adapter family is conversational_ws / qwencloud (ai-connector endpoint /qwencloud).
Usage
- Require the
Modules.Grokmodule in your VoxEngine scenario. - Create a
QwenCloud.VoiceAgentAPIClientinstance (viaQwenCloud.createVoiceAgentAPIClient) and provide your parameters - Send media between
Calland theQwenCloud.VoiceAgentAPIClient(via*.sendMediaorVoxEngine.sendMediaBetween) - Listen to
QwenCloud.VoiceAgentAPIEventsand implement the scenario logic - Send
sessionUpdatebefore the first audio frame.turn_detection: nullselects push-to-talk
The default model is qwen-audio-3.1-realtime-plus.
Here is the complete scenario example for your reference:
Here is the function calling example: