Play tts within a multi-step dialog without actually needing a response (like a 'one moment please' prompt)


#1

Hi there,

is it possible to either do this (see subject) with something like a ‘notification’ posted to continueSession (which is at least not documented at the moment) or can I somehow influence the recognizer parameters on the fly in such a way that it only waits for say 200ms and then an intentNotRecognized would be send that I could handle accordingly (which means i would ignore it in such a case)?

Usecase is, I want to say ‘one moment please’ before I do a lengthy backend operation and I don’t see a possibility with the current API at least. But maybe I’m overlooking something?

Best from Berlin!


#2

Hi,

if you don’t need another response later on, you could just send SessionEnd with “Please stand by”.
After your complex calculations you can then just send out the tts directly (hermes/tts/say).

I don’t think it is possible to delay the timeout or continueSession without another user input (but please correct me! ;))


#3

In the toml file here are setting for the timeout etc values so you can change this… but it is global so this length timeout is then for everything, not for that one time you need it

I have asked in the past to have some way of sending with the continueSession data a value to change the timeout for when it’s specially needed so it’s not global


#4

Hi Philipp,
thanks a lot, that’s what I suspected. Since this is part of a larger dialogue your solution is not really feasible here. I thought about a similar solution though, so that close the session with ‘one moment’ then do my lengthy backend query and then initialise a new session and do a little sessionId trickery. But to my surprise that did not work. The end session tts was not played an so it did not say “one moment” please.
I will investigate further but a proper addition to the API would be helpful here (like a notification to continueSession or something like that)

Best,
Peter


#5

Thank you, ozie.
I’ve found the setting in the toml file but as you say they are global and thus won’t help me here in this case.
I second your motion with regard to be able to control the timeout (and probably endpointer) parameters on a per interaction basis :slight_smile:

Best from Berlin,
Peter


#6

This is because of a threading conflict. To solve this you can:

  • End you session by saying “one moment please”
  • On the next line create a delay. Don’t use time.sleep()!! Instead do a threading.Timer(interval=0.2 func=myBackgroundMethod, args=[you, arguments, if, any, needed]).start()

#7

Hi Psycho,

thanks for your advice. I’m going for using hermes/tts/say directly at the moment. I’m using node.js and it seems to work reasonably well :slight_smile:

Best from Berlin,
Peter


#8

Hi Philipp,

I’m doing it the other way round now. I’m saying ‘one moment please’ with hermes/tts/play and then I start my backend access. That seems to work reasonably well!
Thanks for pointing me into that direction.

Best,
Peter