In order to send a voice message to an Alexa device it’s possible to use the a Message node or a Alexa Speech node to be able to use all Alexa’s features.

Alexa and its NLP it’s able to perform text recognition, then only messages that will pass through the output pin on the Alexa Receiver node are Events and ntents. Generally after a Alexa Receiver node there is a Rules node in order to detect which intent name was detected, like in this example

Example Alexa Card

Example Alexa Card

The Alexa Speech node can reproduce normal text or special tags of the Speech Synthesis Markup Language.

When sending a request speech to the user, the microphone stay open for 8 seconds, if the user doesn’t respond, the reprompt speech is played, if the user doesn’t respond in the next 8 seconds, the session is closed. The reprompt speech is optional and need to be chained with the normal speech:

Example Alexa Card

Example Alexa Card

In order to create a speech programmatically in a upstream Function node

msg.payload = {  
  speechType: 'plainText',  
  text: 'Anything to say',  
  playBehavior: 'enqueue',  
  reprompt: false
};

Available parameters for the msg.payload

Name Type Description
speechType string Type of speech. One of plainText or ssml
text string Text of plainText speech type
ssml string Markup of ssml speech type
playBehavior string Type of playing: enqueue (add the speech to the queue), replaceAll (replace all messages in queue and plays immediately), replaceEnqueued (replace all messages in queue)
reprompt boolean Mark this speech as reprompt