Использование Voice Enabled для React или Angular с использованием Amplify взаимодействия - PullRequest
1 голос
/ 07 апреля 2020
I am using aws-amplify interaction : https://aws-amplify.github.io/docs/

Код взаимодействия:

 <ChatBot
          title="My Bot"
          theme={myTheme}
          botName="OrderFlowers"
          welcomeMessage="Welcome, how can I help you today?"
          onComplete={this.handleComplete.bind(this)}
          clearOnComplete={true}
          conversationModeOn={false}
          voiceEnabled={true}
          voiceConfig={customVoiceConfig}
        />

 const customVoiceConfig = {
      silenceDetectionConfig: {
          time: 2000,
          amplitude: 0.2
      }   
  }

Я перехожу по этой ссылке : https://aws-amplify.github.io/docs/js/interactions

    *While using voice enabled interaction I am getting this error. When I press the voice button.*

    [enter image description here][1]Aws_restJson1_1.ts:834 Uncaught (in promise) **BadRequestException: Invalid Request: The header x-amz-content-sha256 must be set to the literal string** UNSIGNED-PAYLOAD.
        at http://localhost:3000/static/js/1.chunk.js:91237:42
        at step (http://localhost:3000/static/js/1.chunk.js:318206:17)
        at Object.next (http://localhost:3000/static/js/1.chunk.js:318137:14)
        at fulfilled (http://localhost:3000/static/js/1.chunk.js:318092:24)

      [1]: https://i.stack.imgur.com/4heUC.png

Может Кто-нибудь, помогите мне разобраться в этом вопросе.

1 Ответ

0 голосов
/ 30 апреля 2020

У меня такая же проблема с компонентом ampify chatbot ui, и я открыл проблему для этого в aws -sdk repo: https://github.com/aws-samples/create-react-app-auth-amplify/issues/18 После некоторого анализа я считаю, что библиотека должна быть немного скорректирована для устранения этой ошибки.

...