Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
174
stars
80
forks
source link
Catch the Lex error since Lex only supports 15s speech #130
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...
[x] removed hard-coded Cognito IDs
[x] manually smoke-tested the BabylonJS integration tests
[x] manually smoke-tested the BabylonJS demos
[x] manually smoke-tested the Three.js integration tests
[x] 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.
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
Submission Checklist
I confirm that I have...
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.