Skip to content

Session.say priority #487

@akornyukhin

Description

@akornyukhin

Hey guys!

I have the following use-case:
I am using STT-LLM-TTS as my arch, and part of the solution is a long running pipeline which I invoke in llm_node.
Since it is running for a while I want to send user the updates, so that they know something is happening

I tried using session.generate_reply, but this invokes llm_node as well, so the whole thing goes into infinite loop

I get some success with session.say though, but the problem with it is that the audio is being played AFTER my pipeline is finished and the response is played to the user.

I tried exploring what session.say does and stumbled upon speech_created event which I can catch, and even check if the speech was generated by myself, but I have no idea how to play it immediately - any suggestions?

Also SpeechHandle has some priority variable, which I thought can help, but seems like they are not used anywhere, at least I was able to find them.

Hope this makes things clear and someone can suggest something :)

P.S. I am aware of this, but still want to explore alternative routes, because otherwise I need to keep track of tools_calling and their statuses, in case the user asks another question on top

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions