AS AgentScopeAPI 手册 / API Reference
包package agentscope.realtime

agentscope.realtime

module agentscope.realtime

agentscope.realtime 属于实时语音,低延迟语音与多模态会话。 该包共收录 29 个公开类型。

The model side of a voice session: realtime models, their cards and events, transports and VAD. The agent that ties them together is :class:agentscope.agent.RealtimeAgent.

源码Source agentscope/realtime/__init__.py:1

类Classes

AudioDeltaEvent
类class
音频增量事件,描述执行过程中的事件。
A chunk of assistant speech.
AudioFrame
类class
一种分块的上游用户音频。
A chunk of upstream user audio.
ControlFrame
类class
Control Frame,处理低延迟的实时语音与多模态交互。
One upstream control event.
ControlFrameType
类class
Control Frame 类型,处理低延迟的实时语音与多模态交互。
The non-audio things a remote client can say.
DashScopeAudioRealtimeModel
类class
DashScope 音频实时模型,处理低延迟的实时语音与多模态交互。
The Qwen-Audio-Realtime API over WebSocket.
DashScopeRealtimeModel
类class
DashScope 实时模型,处理低延迟的实时语音与多模态交互。
The Qwen-Omni realtime API over WebSocket.
GeminiRealtimeModel
类class
Gemini 实时模型,处理低延迟的实时语音与多模态交互。
The Gemini Live API over WebSocket.
InputTranscriptionEvent
类class
输入 Transcription 事件,描述执行过程中的事件。
The settled transcript of one user turn.
InputTranscriptionFailedEvent
类class
输入 Transcription 失败事件,描述执行过程中的事件。
The provider could not transcribe one committed user turn.
LocalAudioTransport
类class
本地音频传输层,处理低延迟的实时语音与多模态交互。
Microphone in, speaker out, via ``sounddevice``.
ModelDisconnectedError
类class
模型已断开错误,处理低延迟的实时语音与多模态交互。
The provider closed the session; the next user audio reconnects.
ModelErrorEvent
类class
模型错误事件,描述执行过程中的事件。
An error reported by the provider.
ModelEvent
类class
模型事件,描述执行过程中的事件。
Common base class, for type hinting only.
OpenAIRealtimeModel
类class
OpenAI 实时模型,处理低延迟的实时语音与多模态交互。
The OpenAI Realtime API over WebSocket.
PlayoutPosition
类class
Playout Position,处理低延迟的实时语音与多模态交互。
How much assistant audio actually left the speaker — the only sound basis for truncating a barge-in.
RealtimeModelBase
类class
实时模型基类,处理低延迟的实时语音与多模态交互。
A bidirectional realtime model: audio in, audio and tool calls out.
RealtimeModelCard
类class
实时模型卡片,处理低延迟的实时语音与多模态交互。
Describes one realtime model. Everything here varies with the model name; what the adapter implements lives on :class:`RealtimeModelBase`.
ResponseCreatedEvent
类class
响应已创建事件,描述执行过程中的事件。
The provider started producing a reply.
ResponseDoneEvent
类class
响应 Done 事件,描述执行过程中的事件。
The provider finished producing a reply.
SessionEndedEvent
类class
会话 Ended 事件,描述执行过程中的事件。
The provider session is gone; no further events will arrive.
SpeechEndedEvent
类class
语音 Ended 事件,描述执行过程中的事件。
The provider's own VAD detected the user stopping.
SpeechStartedEvent
类class
语音已启动事件,描述执行过程中的事件。
The provider's own VAD detected the user starting to speak.
SpeechTransition
类class
语音 Transition,处理低延迟的实时语音与多模态交互。
A transition in voice activity, as detected by a VAD. Not an event class; the model-side ``SpeechStartedEvent`` is what a provider reports.
ToolCallEvent
类class
工具调用事件,描述执行过程中的事件。
A complete tool call requested by the provider.
TranscriptDeltaEvent
类class
Transcript 增量事件,描述执行过程中的事件。
A chunk of the assistant's spoken text.
TransportBase
类class
传输层基类,处理低延迟的实时语音与多模态交互。
Connects a :class:`RealtimeAgent` to where audio comes from and goes to.
VADBase
类class
语音活动检测基类,处理低延迟的实时语音与多模态交互。
Voice activity detection over a stream of PCM16 mono audio.
XAIRealtimeModel
类class
xAI 实时模型,处理低延迟的实时语音与多模态交互。
The Grok voice speech-to-speech API over WebSocket.

属性Attributes

TransportFrame
字段attribute
—

属性详情Attribute Details

TransportFrame

 = AudioFrame | ControlFrame

TransportFrame 字段。

The transport frame field.

源码Source agentscope/realtime/_transport/_base.py:45
基于官方固定版本源码静态生成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.