包package
agentscope.realtimeagentscope.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 | ControlFrameTransportFrame 字段。
The transport frame field.
源码Source
agentscope/realtime/_transport/_base.py:45