Botframework-webchat: Microphone Turns off After a RetryPrompt Call

Created on 30 Mar 2020  路  10Comments  路  Source: microsoft/BotFramework-WebChat

Screenshots


Version

Webchat: V4.8
CDN: https://cdn.botframework.com/botframework-webchat/latest/webchat.js
Botframework: V4

Describe the bug

When a prompt option has not been met e.g. Yes/No a RetryPrompt call is automatically raised by the bot framework.
The RetryPrompt message is shown on the screen and spoken by the bot.
However, the mic is automatically deactivated which forces the users to manually click on the mic icon to turn it on.
Bot code snippet:
await stepContext.Context.SendActivityAsync("Are you sure about it?:)", "Are you sure about it?", cancellationToken: cancellationToken);
return await stepContext.PromptAsync(nameof(ChoicePrompt),
new PromptOptions
{
Prompt = null,
RetryPrompt = MessageFactory.Text("Try it again please","Try it again please"),
Choices = new[]
{
new Choice {Value = "Yes", Synonyms = new List {"sim"}},
new Choice {Value = "No", Synonyms = new List {"nao"}}
}.ToList(),
Style = ListStyle.Auto
});

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

The bot should show and speak a reply prompt message but keep the mic on for user voice reply.

Additional context

[Bug]

Bot Services Question customer-replied-to customer-reported

All 10 comments

Hi @Amintasn, thank you for filing this issue. I will take a look a close look at this today and get back to you.

Thanks @corinagum. Really appreciated.

Hi again, I was not able to get to this today but it is number 1 on my list for tomorrow. I apologize for the delay.

No worries at all. Thanks for the update!

Hi @Amintasn Sorry to say that I'm unable to reproduce this problem. Could you either provide a bot/link that shows this behavior, or provide more detailed reproduction steps?

Are there any console errors when you experience this?

I am using a speech enabled bot, using the multi-turn prompt v4 sample with reprompt text added in. Speech works as expected, and when I speak a non-valid choice (doesn't appear in the suggested actions), the bot reprompts, continues to show the suggested actions, and opens the microphone. I am able to then respond via speech as expected.

Hi @corinagum , thanks for the fast reply.
I can definitively do that but before we get into that I believe I know why the issue is not presenting to you.
Your test code is probably not using the RetryPrompt option from the PromptOptions list.
The default approach (without the Retry prompt option) works fine.
However, we need to provide a custom message when an unexpected reply has been provided.
Would you mind having a second look to that pls?
The code snippet on the problem statement demonstrate the usage of the RetryPrompt call which goes like this:
RetryPrompt = MessageFactory.Text("Try it again please","Try it again please")

Hi @corinagum.
Just wondering if you have any news about it.
Please do not hesitate to reach me if you need further info about the issue.
Thx!

It looks like you can add the inputHint to the Activity.

Could you give this a try?

RetryPrompt = MessageFactory.Text("Try it again please","Try it again please", InputHints.ExpectingInput)

Schema

Feel free to also take a look at this sample: core-bot

Spot on Corina!
Working perfectly now.
Thanks a million for your help!
Take care.

Was this page helpful?
0 / 5 - 0 ratings