scalableminds / chatroom

React-based Chatroom Component for Rasa Stack
https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/demo.html
GNU Affero General Public License v3.0
307 stars 207 forks source link

speechSynthesis() without permission is no longer allowed - how to correctly deactivate? #165

Closed Jonbene closed 3 years ago

Jonbene commented 3 years ago

Hey there,

for a university project we are checking some chatbot frameworks and decided for Rasa - with the Chatroom integration.

While doing a quick short test of chatroom, we discovered following 3 warnings in Chrome: chatroom-mapping

Are they by any meanings highly relevant and if, is there a way of a workaround with only using the chatroom snippet? Or - and sorry if this is a silly question (we are just at the beginning and learning) - is there a need of custom javascript to cope with that?

Thanks and i hope i did not miss this in already answered questions!

Greetings from Germany Jon

hotzenklotz commented 3 years ago

If it is just a warning, I guess you can ignore it.

Also, I believe if you do not specify the speechRecognition & voiceLang arguments in the constructor, the feature is disabled:

<head>
  <link rel="stylesheet" href="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.css" />
</head>
<body>
  <div class="chat-container"></div>

  <script src="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.js"/></script>
  <script type="text/javascript">
    var chatroom = new window.Chatroom({
      host: "http://localhost:5005",
      title: "Chat with Mike",
      container: document.querySelector(".chat-container"),
      welcomeMessage: "Hi, I am Mike. How may I help you?",
    });
    chatroom.openChat();
  </script>
</body>
hotzenklotz commented 3 years ago

Alternatively, feel free to fix the JS code and send a pull request.

Jonbene commented 3 years ago

That was quick - thank you! The suggestion with removing those two parameters already did it. Could have tried that earlier myself... Thank you very much!