microsoft / botframework-components

The repository for components built by Microsoft for the Azure Bot Framework.
https://aka.ms/botdocs
MIT License
113 stars 82 forks source link

InputHint 'ignoringSpeechInput' and 'ignoringNonSpeechInput' is not working #1366

Closed vinbala closed 2 years ago

vinbala commented 2 years ago

Bug

Bug: InputHint 'ignoringSpeechInput' and 'ignoringNonSpeechInput' is not working

Version

Bot Framework Composer Version: 2.1.2 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0

To Reproduce

Has a speech prompt with InputHint = ignoringSpeechInput or InputHint = ignoringNonSpeechInput

Expected behavior

InputHint = ignoringSpeechInput --> This should disable speech input, all other inputs should be allowed. InputHint = ignoringNonSpeechInput --> This should disable all inputs other than speech.

Screenshots

image

jameslew commented 2 years ago

Note - this is in the Telephony composer package. Per docs barge in docs we should be able to override composer setting by specifying a valid inputHint inside the prompt.

The doc reference two additional inputHint values: https://github.com/microsoft/botframework-telephony/blob/28ff59a78c5678b731b795d5bb4e54e9ac933f1b/BargeIn.md#inputhint-additions

I can only find the base three however in the inputHints.cs schema: https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Schema/InputHints.cs

GitHub
Build software better, together
GitHub is where people build software. More than 83 million people use GitHub to discover, fork, and contribute to over 200 million projects.
GitHub
botbuilder-dotnet/InputHints.cs at main · microsoft/botbuilder-dotnet
Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET. - botbuilder-dotne...
ramfattah commented 2 years ago

The InputHints field in JavaScript SDK side contains the same three constants as the .NET SDK:

JavaScript SDK

https://github.com/microsoft/botbuilder-js/blob/a79ddf9156e10418b8cb528216764784b6aa082c/libraries/botframework-schema/src/index.ts#L2127

export enum InputHints {
    AcceptingInput = 'acceptingInput',
    IgnoringInput = 'ignoringInput',
    ExpectingInput = 'expectingInput',
}

.NET SDK

https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Schema/InputHints.cs

    public static class InputHints
    {
        /// <summary>
        /// The hint value for accepting input.
        /// </summary>
        public const string AcceptingInput = "acceptingInput";

        /// <summary>
        /// The hint value for ignoring input.
        /// </summary>
        public const string IgnoringInput = "ignoringInput";

        /// <summary>
        /// The hint value for expecting input.
        /// </summary>
        public const string ExpectingInput = "expectingInput";
    }
GitHub
botbuilder-js/index.ts at a79ddf9156e10418b8cb528216764784b6aa082c · microsoft/botbuilder-js
Welcome to the Bot Framework SDK for JavaScript repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using JavaScript. - botb...
GitHub
botbuilder-dotnet/InputHints.cs at main · microsoft/botbuilder-dotnet
Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET. - botbuilder-dotne...
johnataylor commented 2 years ago

@vinbala thanks for opening this issue, however, we are not prioritizing this work at this stage, closing.

stevengum commented 2 years ago

The ignoringSpeechInput and ignoringNonSpeechInput InputHints do work, however they only apply for the duration of the message playback.

See the newly added FAQ's question: What are <break> tags? Why are <break> tags useful? for an example on how to combine <break> tags with InputHints to achieve the desired result of only accepting DTMF or Speech Inputs