Esempio n. 1
0
        private async Task WaitForLuisMessage(IDialogContext context, IAwaitable <object> result)
        {
            var activity = await result as Activity;

            var TextToLuis = activity.Text;

            luisResult = await LuisConnector.GetLuisResult(TextToLuis);

            await this.HandleLuisMessage(context);
        }
Esempio n. 2
0
        public async Task Help()
        {
            var orderText = await SpeechRecognizer.GetText();

            var connector  = new LuisConnector(AppConfiguration.LuisApiSubscriptionKey, AppConfiguration.LuisApiEndPoint, AppConfiguration.LuisApiApplicationId);
            var luisResult = await connector.PredictAsync(orderText);

            var intentHandler = GetIntentHandler(luisResult);
            var resultText    = await intentHandler.Handle(luisResult);

            await SpeechSynthesizer.Read(resultText, _voicePlayer);
        }