Skip to content

Commit

Permalink
add dialogRequestID to help
Browse files Browse the repository at this point in the history
  • Loading branch information
sammachin committed Jan 13, 2022
1 parent 31d7478 commit 96df20c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ This node will allow you to interact with the Alexa Voice Service (the same API
### Inputs

: payload (buffer) : the audio to send to the service.
: *dialogRequestId* (string) : Where the audio is part of an existing dialog the ID from the previous response


### Outputs

: payload (object) : the response from the Alexa Voice Service, certain objects will be binary audio buffers.
: dialogRequestId (string) : the dialog ID either as was set on the input or a new random string.


AVS responds with a multipart object, the Node will parse this into a single object,
### Details

`msg.payload` should be 16Khz PCM Mono audio, the node will attempt to convert any buffer input using ffmpeg but ideally you should capture in the correct format.

`msg.dialogRequestId` is used by AVS to assocaite multiple interactions within the same conversation, if you are starting a new dialog this does not need to be set on the input and the node will generate one. For replies it should match the previous response

`AVS Endpoint` is the avs server nearest to your application, Europe, US and Asia values are pre-set or advanced users can manually set this to another value.

The `Access Token` should usually be passed in as a parameter on the message object as these have a limited time to live, however you can also hard code it or reference a context object.
Expand Down
4 changes: 4 additions & 0 deletions nodes/avs.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,20 @@
### Inputs

: payload (buffer) : the audio to send to the service.
: *dialogRequestId* (string) : Where the audio is part of an existing dialog the ID from the previous response


### Outputs

: payload (object) : the response from the Alexa Voice Service, certain objects will be binary audio buffers.
: dialogRequestId (string) : the dialog ID either as was set on the input or a new random string.

### Details

`msg.payload` should be 16Khz PCM Mono audio, the node will attempt to convert any buffer input using ffmpeg but ideally you should capture in the correct format.

`msg.dialogRequestId` is used by AVS to assocaite multiple interactions within the same conversation, if you are starting a new dialog this does not need to be set on the input and the node will generate one. For replies it should match the previous response
`AVS Endpoint` is the avs server nearest to your application, Europe, US and Asia values are pre-set or advanced users can manually set this to another value.
The `Access Token` should usually be passed in as a parameter on the message object as these have a limited time to live, however you can also hard code it or reference a context object.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sammachin/node-red-alexa-voice-service",
"version": "0.1.0",
"version": "0.1.1",
"description": "Node-RED nodes for the Alexa Voice Service",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 96df20c

Please sign in to comment.