Busy indicator on HTTP API

In short:

As a user,
I want to know whether my Rhasspy is busy listening to a command or “speaking” a response
So I can play event-driven audio over my rhasspy without interfering “normal” processes

Bit more context:
I’m building my own HTTP server for handling intents and I want to extend it with the possibility for non-synchronous text-to-speech.

What I mean with that is: normally an intent is triggered by the user, some code somewhere creates a response, and the text of that response is “spoken” by Rhasspy again.

But I want to enable use cases like:

  • Setting a timer, and notifying x minutes later that the timer ended
  • Notifications based on my calendar
  • Notifications about new email
  • Etc.

If these notifications (and those notifications could be complete sentences) are played when I am talking to the Rhasspy, or when Rhasspy is still answering a previous Intent, things would get confusing.

So would it be possible to have a flag on the API which indicates whether Rhasspy is busy with a conversation?