aws-lex-web-ui icon indicating copy to clipboard operation
aws-lex-web-ui copied to clipboard

No voice output

Open athewsey opened this issue 3 years ago • 1 comments

Just deployed the stack in ap-southeast-1 with Cognito auth disabled, against a default 'BookTrip' LexV2 bot.

The bot handles text chat OK, but voice is not working. When I submit a voice message:

  • The recording widget seems to work OK (mic button, volume, stop button)
  • The 'waiting' ellipsis message briefly pops up and then clears again
  • The browser network console shows a successful HTTP200 POST to https://runtime-v2-lex.ap-southeast-1.amazonaws.com/bots/{}/botAliases/{}/botLocales/{}/sessions/ap-southeast-1%{}/utterance, with a response header of content-type: audio/ogg... So the browser seems to be receiving an audio result
  • ...But nothing played on the speakers

I also observe that:

  • Although the recording seems to finish fine by most measures, the browser tab continues to display a red recording icon: Is this expected?
  • For some reason initially I was seeing HTTP403 errors on a Polly endpoint, which seemed to be resolved when I tried adding AmazonPollyFullAccess to my lex-web-ui-CognitoIdentityPool-CognitoUnauthRole... However, if I now remove that position again I'm seeing HTTP200s still??? IDK if there's some one-time setup or something.

I've tried in both Firefox and Chrome, on both my mac and (Android) mobile.

No errors in the browser JS console, only:

index.html:49 ChatBotUiLoader loaded
lex-web-ui.min.js:11 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)

athewsey avatar Apr 28 '21 08:04 athewsey

Finally figured it out & big facepalm time:

I was pressing the stop button when I was done talking... To stop recording, right? It seemed so natural I never even questioned it.

Anyway, turns out that doesn't work - everything is fine if you just let the recording finish by itself.

Would be really interested to know whether this is meant to be an 'abort' button by design, or whether there's some minor bug to it? I was confused because the app still seems to make a successful Lex API call when stop is pressed!

athewsey avatar Apr 29 '21 13:04 athewsey