I am building a Coratana skill by first building a bot, using FormFlow. I detect my intents and entities using LUIS and pass the entities to my FormFlow dialog. If one or more FormFlow fields is not filled in, FormFlow dialog prompts the user to fill in the missing information, but this prompt is not spoken, only shows on the cortana screen. Is there any way for FormFlow to speak the prompts?
In the screenshot shown below, the prompt "Do you need airport shuttle?" was just displayed and not spoken:
My formFlow definition looks like this:
[Serializable]
public class HotelsQuery
{
[Prompt("Please enter your {&}")]
[Optional]
public string Destination { get; set; }
[Prompt("Near which Airport")]
[Optional]
public string AirportCode { get; set; }
[Prompt("Do you need airport shuttle?")]
public string DoYouNeedAirportShutle { get; set; }
}
The answer form Ezequiel Jadib helped me to solve what I needed for my use case. I just added a few additional lines to set the
InputHint
field toExpectingInput
if the text is a question. With this configuration Cortana automatically listens to my answer and I don't have to activate the microphone by myself.I don't think Speak is currently supported in
FormFlow
.What you could do, as a workaround is adding an
IMessageActivityMapper
that basically promote text to speak automatically.Then to use it, you need to register it in your
Global.asax.cs
file as: