How to control voice input using the mic button on the chatbot

Sometimes the chatbot mic input gets turned off before the chatbot user can finish the utterance and the partial utterance is sent for processing. This can be really annoying to slow speakers. To overcome this problem, we have introduced a new feature that will allow the admin users to give the chatbot user control over when to send the voice input for processing.

Settings

As an admin user, you can enable this setting in two places:

Bot Provider V2

  1. Go to Experience Designer > Bot Manager flow > Bot Provider V2 node > Bot Out Parser

  2. Place the below code.

    msg.payload.autoPost = false;

    Ā 

Chatbot settings

You can also enable this feature from Chatbot settings

  1. Navigate to the Experience Manager > select a project > Project side navigation menu > Develop > Chatbot Settings > Settings.

  2. The default setting is "autoPost": true

  3. Change the setting to "autoPost": false as shown in the screenshot below.

Ā 

Chatbot Experience

When the ā€œautoPostā€œ is set to false i.e; "autoPost": false

  1. The chatbot user should manually click on the ā€œSendā€ button to send the processed Speech To Text input to the server.

    Ā 

  2. The user can use the mic input button to start/pause the recording. The converted Speech To Text value after the pause will be appended to the existing text in the user input box.

Related articles

Ā