Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch the Lex error since Lex only supports 15s speech #130

Merged
merged 7 commits into from
Jun 3, 2022

Conversation

eherozhao
Copy link
Contributor

@eherozhao eherozhao commented May 25, 2022

Description

Amazon Lex is limited to 15 seconds for audio input. If a user tries to record more than 15 seconds of audio with our LexFeature an error is thrown. Therefore, this PR is to catch the error from Lex side and re-throw it with a customized string to notice customers if the audio is more than 15s.

Added unit testing to check that the error rethrown from the endVoiceRecording was the customized one.

Reviewer Testing Instructions

  • Unit testing.
  • ChatBot demo: recording more than 15s audio and watch the Console.

Submission Checklist

I confirm that I have...

  • removed hard-coded Cognito IDs
  • manually smoke-tested the BabylonJS integration tests
  • manually smoke-tested the BabylonJS demos
  • manually smoke-tested the Three.js integration tests
  • manually smoke-tested the Three.js demo

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eherozhao eherozhao added the enhancement New feature or request label May 25, 2022
@eherozhao eherozhao requested review from runpiw and JuliaABurch May 25, 2022 01:52
@eherozhao eherozhao requested a review from Krxtopher June 3, 2022 04:25
@eherozhao eherozhao merged commit 0119829 into aws-samples:mainline2.0 Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants