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

Microphone Not Working When Using Multiple Languages (NotSupportedError)

Open nagendrapredictif opened this issue 9 months ago • 2 comments

Description

When configuring the Lex Web UI with multiple languages, the microphone functionality breaks when switching between languages. The issue specifically occurs when using both English and Spanish together, though they work individually.

Current Behavior

  • Microphone works when using single language (either en_US or es_US)
  • When configuring both languages together, clicking the mic icon results in error
  • Console shows: NotSupportedError: The element has no supported sources

Expected Behavior

  • Microphone should work regardless of language selection
  • Should be able to switch between languages and use voice input for both

Configuration

json { "lex": { "v2BotId": "ISAQDQYPMZ", "v2BotAliasId": "OOLPQ1XBGK", "v2BotLocaleId": "en_US,es_US", "botName": "ISAQAQYCMY", "botAlias": "$LATEST", "initialText": "Hello! You can ask me for help inorder to register for sleep test.", "initialSpeechInstruction": "Say 'Sleep Test' to get started." }, "polly": { "voiceId": "Joanna,Lupe" }, "recorder": { "preset": "speech_recognition", "recordingTimeMin": "5", "recordingTimeMax": "15", "encoderUseTrim": true } }

Error Stack Trace

lex-web-ui.min.js:43 Uncaught (in promise) NotSupportedError: The element has no supported sources. (anonymous) @ lex-web-ui.min.js:43 setAudioAutoPlay @ lex-web-ui.min.js:43 (anonymous) @ 4.1.0_dist_vuex.min.js:1 A.dispatch @ 4.1.0_dist_vuex.min.js:1 A.t.dispatch @ 4.1.0_dist_vuex.min.js:1 setAutoPlay @ lex-web-ui.min.js:43 startSpeechConversation @ lex-web-ui.min.js:43 onMicClick @ lex-web-ui.min.js:43

Environment

  • Browser: Chrome
  • Operating System: [Your OS]
  • aws-lex-web-ui version: [Version number]

Steps to Reproduce

  1. Configure Lex Web UI with multiple languages (en_US,es_US)
  2. Load the chat interface
  3. Select Spanish language from the dropdown
  4. Click on the microphone icon
  5. Observe the error in console and non-functioning microphone

Additional Context

  • The issue only occurs when multiple languages are configured together
  • Each language works correctly when configured individually
  • Microphone permissions are properly granted in the browser
  • Using HTTPS for the connection

nagendrapredictif avatar Feb 05 '25 03:02 nagendrapredictif

Thanks for the detailed bug report, I will look into it and try to get some info back to you later this week.

atjohns avatar Feb 05 '25 13:02 atjohns

Hi, apologies for the delay on this but I'm unable to replicate this error. Is this a bot you built from scratch or are you leveraging another solution like an LLM or QnA bot?

atjohns avatar Feb 17 '25 14:02 atjohns