Getting a text response from the Assistant Relay addon

Is it possible to get a written response from the Assistant Relay addon in HA? Need to set a state based on the response.

Thanks

@backslashv

I want to do the same. Were you able to get this to work?

Nope! I thought of achieving this in a very complicated way but I couldn’t get past a certain point and decided not to pursue it. What I thought was using an STT (speech to text) mechanism. In HA, one can, theoretically, get the STT to work using the google_cloud platform. I couldn’t set it up because the instructions are outdated and there is a lot of changes on Google’s side. The other issue is that the output of the Assistant Relay’s spoken response is in .wav format, but Google Cloud accepts .mp3. This part is not that much of an issue because I found an online audio conversion service which provides a free REST API.

I just wanted the text response and I got it to work using NodeRed. However, there isn’t always a text response available from the assistant

Right. I can also get the written responses through a curl call. They come in a json form so they’re easy to parse.

Hi, were you able to get the text response? I am dealing with the same issue to get the temperature from my thermostat and I only get the audio response, no text.

Hi, no. What I did was download the audio response, check the size of the file and based on that, determine what the response was. In my case, there were only a handful of responses, so it was easy to categorize the different audio sizes. For temperature, I would say you can categorize a range of temperature that you normally live in to make it easier.

Not sure if this is the same you are looking for, but I made a flow in Node red that can ask me if I want an sms to be read out loud, and I can respond to it with “hey Google. Yes please”. Or ask to read it again louder.

This is based on that you only have very limited responses you can give.
As soon as you start adding more then it will be hard to maintain, I believe.

I can post it later if you are interested.