agents icon indicating copy to clipboard operation
agents copied to clipboard

In the SpeechHandle instance, is it possible to support obtaining the content that has already been read aloud?

Open Panmax opened this issue 1 week ago • 0 comments

Feature Type

Would make my life easier

Feature Description

When calling session.say or session.generate_reply, if interrupted, it is hoped that the returned SpeechHandle instance can obtain the portion that has been spoken(user has already heard content).

For example:

speech_handle = self.session.say(text=text, allow_interruptions=True, add_to_chat_ctx=False)
await speech_handle
if speech_handle.interrupted:
    forward_text = speech_handle.forward_text  # user has already heard content
    ....
    # based on forward_text to execute other tasks

Workarounds / Alternatives

No response

Additional Context

No response

Panmax avatar Nov 26 '25 08:11 Panmax