aws-samples / amazon-sumerian-hosts

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

Improve LexFeature behavior #94

Closed runpiw closed 2 years ago

runpiw commented 2 years ago

Description of changes: This change improves the usage of Lex Features in:

  1. enableMicInput now does not throw any custom created Error which leaves the users to catch any error happened by themselves
  2. Add state for tracking mic ready and make beginVoiceRecording and endVoiceRecording do nothing if mic is not ready or is not currently recording

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

runpiw commented 2 years ago

I have one small request related to documentation. I provided suggested code, so if you like it you can just accept the suggestion.

Thanks. I just accepted the suggestion. I didn't include the DOMException comment in the first pass since i thought there might be other types of errors within this function block but it looks like getUserMedia is the only place where it could throw error.