Which Alexa node suitable (Speech to text messaging)


I have built a message system using and ESP12 and 2-line LCD display. It receives MQTT messages via Node-Red and can send an acknowledgement back.

It's a teenager notification unit!

I open a Node-Red UI on my mobile device, type in a message (e.g. Your dinners ready) and that get sent from Node-Red to his display, it also flashes an LED and sounds a loud buzzer. He presses a button on top to silence it which also sends an MQTT message back to Node-Red which displays an 'OK' acknowledgement on the UI.

Works great.

Now, is there a way I can do it with Amazon Alexa, i.e., ask Alexa to send "your dinners ready" which can be received by Node-Red and then forwarded as an MQTT string as per above. Maybe it could also receive the acknowledgement and Alexa could say "Message Acknowledge".

If this can be done, which plug-in (node) would be best.

I have looked at some of the nodes, but there are 2417 listed so would appreciate anyone pointing me in the right direction to which one could be used (if it is capable that is).

I am asking for help with which node to choose, not actually how to write the flow to do it (not yet anyway).

I would imagine it would have to go through an external service for the voice to text part rather than local.



Alexa would need the ability to understand the spoken expression ("your dinner is ready"). Otherwise, it will reply with something like "I don't know how to do that."

For example, if you said "Turn on dinner" it would understand it because it has an inherent skill to turn devices on and off. However, it wouldn't be able to comply with the request because it would look for a device called "dinner" and fail to find it.

You would need to create a custom skill and, as far as I know, there's no node available for that.

I am using node-red-contrib-alexa-remote2 to listen for a specific type of phrase and then perform an action. If I say "turn on the light", or "turn light on", the node detects the phrase, determines which Echo device heard it and then turns on that location's default light. This provides "room-awareness" and allows me to say "turn the light off" in different rooms (where Echos are located) and Alexa will turn off the correct, default light for that room.

Why this works is because of Alexa's inherent skill for turning devices on/off. What's needed is to define "light" as a recognizable device to Alexa and I use another node, node-red-contrib-amazon-echo, to do that.

More information about what I described can be found here.

In your case, you could use node-red-contrib-alexa-remote2 to listen for any phrase that begins with the word "announce". Alexa has an inherent skill for handling announcements. Your flow could then extract the actual announcement and, if it matches a desired phrase (such as "dinner is ready") it can proceed to publish it to an MQTT topic. However, because you commanded Alexa to perform an announcement, it will speak the announcement to all Echos. If you wish to suppress the actual announcement, I don't think that's possible.

Hi 123,

Thanks for the info.
I did suspect it couldn't be done but was hoping that somewhere, there was a sort of speach to text thing lurking somewhere.
I could use the on/off function, have different messages pre-programed then just could issue a command such as 'alexa, turn 1 on' and that could initiate node-red to send a message preprogramed as for that command.
It would probably function fine that way for standard messages. 'Dinner is ready' , 'bed time', etc.

I'll keep at it.

In terms of Alexa, "speech to text" is a skill. If you want Alexa to understand:

  • Alexa, circulate the pool.
  • Alexa, reverse the pump.
  • Alexa, transfer fifty dollars to John's bank account.

you will need to create new skills for that.

Whereas text-to-speech is readily available (in node-red-contrib-alexa-remote2), speech-to-text constitutes creating a new skill and, to my knowledge, there's no node that can create new skills. Creating a new skill is an involved process (beyond the scope of this discussion).

You could use node-red-contrib-alexa-remote2 to detect when this phrase is spoken:

  • Alexa, circulate the pool.

and then proceed to do something like publish it to MQTT or turn on a pool pump or whatever. HOWEVER, without having a skill to understand "circulate the pool", Alexa will reply "I don't know how to do that".

I just recently started playing around with routines in the Alexa App. It seems to me there is a combination with the routine process that might work for your use case.

You can add each query that you want alexa to understand to an alexa blueprint skill.

i use blueprint
Custom Q&A
, if i add the phrase as a question and the answer ok.

That way alexa does not respond with i do not understand how to do that

Which blueprint would you choose to create Cathprotech's example: "Your dinner is ready"?

Custom Q&A
I would set question as

Alexa, Tell the Teapot dinner is ready

and reply as

Ok in breif mode will produce a bleep

Then node-red would listen for that with alexa remote2 node.
Then i would make announcements with the Alexa remote2 Speak routine.

I believe Cathprotech's requirement is to simply say "Your dinner is ready" and not "Tell the Teapot dinner is ready". Can the Custom Q&A blueprint allow you to leave out the "Tell the something" part?

He can use what ever phrase he likes, I'm using mine, and you can use yours.

All i have to say is Alexa tell teapot dinner is ready.

You can also have multiple ways of saying same question.

Understood. I thought the Custom Q&A blueprint mandated the inclusion of "tell the whatever" in the phrase but it was simply your choice.

The Blueprints feature greatly simplifies the process of creating a new skill. Thanks for the tip!

All very interesting replies, thank you.

I think the only option really is just to have pre-programed messages (some of which I already have).
Then use it as though I was turning a light on or off, I could maybe have 2 messages per command.

I could say, 'Alexa, kitchen light on' or 'Alexa, kitchen light off' but call them message 1, so I could say 'Alexa, message 1 on' which could send a pre-programmed message but also have 'Alexa, message 1 off' which I think could send a different pre-programmed message.
This is what I have on my Node-Red UI at the moment.

I don't have many pre-programmed because I use the 'enter message' section. This I can access from any device in my home and my wife can even access over the internet from work.

I'm thinking of making a second unit to place at the bottom of the stairs so we can receive short text messages and reminders as it is very easy to implement.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.