pub struct StreamEvent {
pub voice_activity: Vec<VoiceActivityEvent>,
pub partial_text: Option<TextOutput>,
pub audio_output: Option<AudioBufferInfo>,
pub named_audio_outputs: Vec<NamedAudioOutput>,
pub speaker_turns: Vec<SpeakerTurn>,
pub word_timestamps: Vec<WordTimestamp>,
pub output_artifacts: Vec<VoiceArtifact>,
pub is_final: bool,
}Expand description
流式会话产出的单个事件。
Fields§
§voice_activity: Vec<VoiceActivityEvent>语音活动事件列表。
partial_text: Option<TextOutput>部分文本(流式 ASR 等)。
audio_output: Option<AudioBufferInfo>音频输出(存在时)。
named_audio_outputs: Vec<NamedAudioOutput>命名音频输出列表(如流式 TTS 的逐块 chunk_N)。
speaker_turns: Vec<SpeakerTurn>说话人分段(流式说话人分离等,存在时)。
word_timestamps: Vec<WordTimestamp>词级时间戳(仅产出词戳的族才有;Qwen3 ASR 流式不支持词戳,
见 TaskResult::word_timestamps)。
output_artifacts: Vec<VoiceArtifact>产物输出(流式产出 embedding / 状态等,存在时)。
is_final: bool是否为最终事件。
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§impl Debug for StreamEvent
impl Debug for StreamEvent
Source§impl<'de> Deserialize<'de> for StreamEvent
impl<'de> Deserialize<'de> for StreamEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StreamEvent
impl PartialEq for StreamEvent
Source§impl Serialize for StreamEvent
impl Serialize for StreamEvent
impl StructuralPartialEq for StreamEvent
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more