Hey @FruityWelsh first up, thanks for all your efforts recently on the Message Bus stuff. I’m gonna make some time to go through your suggestions. I think there are certainly some improvements we can make to ensure they are more consistent and better documented.
This one shows two different possibilities for play:query.response
which as you’ve pointed out is not clear at all in the current docs.
@forslund correct me if I’m wrong, but the play:query
can actually receive three different responses from __handle_play_query():
1. Attempting search
This is the unnamed response you’ve referenced but it’s also missing an attribute. This should be sent immediately to notify that the search is underway. It extends the timeout while the Skill looks for a match. It could theoretically be re-sent to extend the timeout further however I don’t believe this happens currently.
self.bus.emit(message.response({"phrase": search_phrase,
"skill_id": self.skill_id,
"searching": True}))
2. Search result
self.bus.emit(message.response({"phrase": search_phrase,
"skill_id": self.skill_id,
"callback_data": callback,
"service_name": self.spoken_name,
"conf": confidence}))
3. Search Failed
self.bus.emit(message.response({"phrase": search_phrase,
"skill_id": self.skill_id,
"searching": False}))