aws-lex-web-ui
aws-lex-web-ui copied to clipboard
initial speech not getting invoked when pressing the microphone button
initial speech not getting invoked when pressing the microphone button. We are using the CFT to deploy our Lex V2 Bot. Can some one please help on the issue.
Lex variables:
"initialText": "Good afternoon, what can I help with today.",
"initialSpeechInstruction": "Good afternoon, what can I help with today.",
"initialUtterance": "",
"reInitSessionAttributesOnRestart": false,
"region": "us-east-1",
"retryOnLexPostTextTimeout": "false",
"retryCountPostTextTimeout": "1"
},
UI variables:
"toolbarLogo": "",
"positiveFeedbackIntent": "",
"negativeFeedbackIntent": "",
"helpIntent": "Help",
"enableLogin": false,
"enableLiveChat": false,
"forceLogin": false,
"AllowSuperDangerousHTMLInMessage": true,
"shouldDisplayResponseCardTitle": true,
"saveHistory": false,
"helpContent": {},
"enableSFX": false,
"minButtonContent": "",
"hideInputFieldsForButtonResponse": false,
"pushInitialTextOnRestart": false,
"directFocusToBotInput": false,
"showDialogStateIcon": false,
"backButton": false,
"messageMenu": true,
"hideButtonMessageBubble": false,
@gauravkumar-aws Initial speech is presently allowed only if a user has authenticated (logged in). This feature was originally implemented using an AWS polly call from the browser client. Allowing this api call for unauthenticated users would open the use of polly to anyone and the AWS account would be responsible for all the polly charges. Hence this feature was changed to require use of an authenticated role. CognitoAuthRoleV1 and CognitoAuthRoleV2 provide this capability in the templates. The LexWebUi enable login feature would need to be enabled when deploying via cloudformation to enable initial speech. I see in your config that enableLogin is false hence this feature won't be available.
There is a pull request open, https://github.com/aws-samples/aws-lex-web-ui/pull/416, that changes this behavior to precreate the initial speech as an mp3 for all supported locales and use the pre-created mp3 when the user clicks the microphone button. This would work for unauthenticated users as well. The pull request has not yet made it into the development branches of the LexWebUi.