AS AgentScopeAPI 手册 / API Reference
类class agentscope.realtime

DashScopeAudioRealtimeModel

class DashScopeAudioRealtimeModel(DashScopeRealtimeModel)
源码Source agentscope/realtime/_dashscope/_audio_model.py:16–282

DashScope 音频实时模型,处理低延迟的实时语音与多模态交互。位于 agentscope.realtime 包,继承自 DashScopeRealtimeModel。核心成员包括 list_models、push_text、replay_history、request_response、input_transcription_enabled。

Same endpoint and framing as Qwen-Omni, but it accepts text turns, spells both PCM formats as "pcm", and offers smart_turn endpointing in place of semantic_vad.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Parameters类class
参数,处理低延迟的实时语音与多模态交互。
Tuneables surfaced to the UI.

属性摘要Property Summary

属性Property说明Description
input_transcription_enabled
读取 `input_transcription_enabled` 属性。
Qwen Audio does not emit settled input transcription.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
type—
类型字段。
'dashscope_audio_realtime'
supports_text_input—
支持文本输入字段。
True
supports_history_replay—
`supports_history_replay` 字段。
True
parameters'DashScopeAudioRealtimeModel.Parameters'
参数字段。
—

方法摘要Method Summary

方法Method说明Description
def list_models(custom_yaml_dir: str | None = None) -> list[RealtimeModelCard]
列出模型。
List the Qwen-Audio cards, which live beside the Omni ones.
async def push_text(text: str) -> Noneasync
设置推送文本。
Send a text user turn and ask for the reply.
async def replay_history(messages: Sequence[Msg]) -> Noneasync
设置该参数。
Insert completed history without asking the model to respond.
async def request_response() -> Noneasync
返回请求响应。
Ask for a reply with the Qwen-Audio modality override.

属性详情Attribute Detail

type

 = 'dashscope_audio_realtime'

类型字段。

The type field.

源码Source agentscope/realtime/_dashscope/_audio_model.py:74

supports_text_input

 = True

支持文本输入字段。

The supports text input field.

源码Source agentscope/realtime/_dashscope/_audio_model.py:75

supports_history_replay

 = True

supports_history_replay 字段。

The supports history replay field.

源码Source agentscope/realtime/_dashscope/_audio_model.py:76

parameters

'DashScopeAudioRealtimeModel.Parameters'

参数字段。声明为 'DashScopeAudioRealtimeModel.Parameters'。

The parameters field.

源码Source agentscope/realtime/_dashscope/_audio_model.py:78

属性详情Property Detail

input_transcription_enabled

def input_transcription_enabled() -> bool

读取 input_transcription_enabled 属性。

Qwen Audio does not emit settled input transcription.

返回Returns bool
返回布尔值,表示判断结果。Returns a boolean result.
源码Source agentscope/realtime/_dashscope/_audio_model.py:81–83

方法详情Method Detail

list_models

def list_models(custom_yaml_dir: str | None = None) -> list[RealtimeModelCard]

列出模型。

List the Qwen-Audio cards, which live beside the Omni ones.

参数Parameters
名称Name类型Type说明Description
custom_yaml_dir默认default Nonestr | None自定义 yaml 目录(类型 `str | None`)。The custom yaml dir.
返回Returns list[RealtimeModelCard]
返回RealtimeModelCard列表。Returns a list of realtime model card.
源码Source agentscope/realtime/_dashscope/_audio_model.py:86–93

push_text

async def push_text(text: str) -> None
async

设置推送文本。

Send a text user turn and ask for the reply.

参数Parameters
名称Name类型Type说明Description
textstr文本(类型 `str`)。The text.
返回Returns None
无返回值。No value is returned.
源码Source agentscope/realtime/_dashscope/_audio_model.py:95–107

replay_history

async def replay_history(messages: Sequence[Msg]) -> None
async

设置该参数。

Insert completed history without asking the model to respond.

参数Parameters
名称Name类型Type说明Description
messagesSequence[Msg]消息列表(类型 `Sequence[Msg]`)。The messages.
返回Returns None
无返回值。No value is returned.
源码Source agentscope/realtime/_dashscope/_audio_model.py:109–213

request_response

async def request_response() -> None
async

返回请求响应。

Ask for a reply with the Qwen-Audio modality override.

返回Returns None
无返回值。No value is returned.
源码Source agentscope/realtime/_dashscope/_audio_model.py:215–224

嵌套类详情Nested Class Detail

Parameters

class Parameters

参数,处理低延迟的实时语音与多模态交互。位于 agentscope.realtime 包,继承自 RealtimeModelBase.Parameters。

Tuneables surfaced to the UI. Declared in agentscope.realtime. Extends RealtimeModelBase.Parameters.

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.