31

Microsoft brand template - .NET Framework

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microsoft brand template - .NET Framework
Page 2: Microsoft brand template - .NET Framework
Page 3: Microsoft brand template - .NET Framework

Productive

Cortana helps you honor commitments and manage the important everyday stuff.

Unbounded

Cortana exists on multiple platforms and device types. She is wherever you are.

Personal

By getting to know you, Cortana can provide tailored and intuitive experiences.

Extensible

Cortana works with her team of experts (that’s you) to help users get things done.

Page 4: Microsoft brand template - .NET Framework

Cortana’s knowledge

User preferences & habits - e.g.

• Cuisine preferences

• Where I live and work

User context - e.g.

• I’m leaving home

• My next meeting location

Users access Cortana across devices and platforms

Android, iOSWindows Devices Home and Car

(Cortana Devices SDK)

Cortana Skills KitDeveloper platform connecting users with experts

Cognitive Services

LUIS

Bot Framework

Cortana ChannelSkill Deployment

Tools

Page 5: Microsoft brand template - .NET Framework

Build your own skill at developer.microsoft.com/cortana Starting now, you can reach 60M+ Cortana users in the U.S. Other markets coming in the future

Page 6: Microsoft brand template - .NET Framework
Page 7: Microsoft brand template - .NET Framework

New!

Page 8: Microsoft brand template - .NET Framework
Page 9: Microsoft brand template - .NET Framework

9

Developers Cortana

Bot Framework Messaging Endpoint

Register endpointsand metadata

Build and deploy

End Users

Hold conversations

Invokes on request

Page 10: Microsoft brand template - .NET Framework
Page 11: Microsoft brand template - .NET Framework

Create your skill

logic using the

Bot Framework

• Build a bot using

the Bot Builder SDK

• Use Cognitive

Services (LUIS) for

natural language

understanding

Add the

Cortana channel

• Register your bot as

a Cortana skill

• Configure Cortana-

specific data and

features

Publish your

skill

• Make your skill

discoverable by all

Cortana users

Page 12: Microsoft brand template - .NET Framework

1DEPLOY TO SELF

Immediate deployment of the skill to the

developer’s MSA

Used for early testing

2DEPLOY TO GROUP

Share a skill with one or more MSA users

User consent must be given to have the

skill appear

Used for beta testing a skill with users

3DEPLOY TO PRODUCTION

Skill becomes automatically available to all

MSA Cortana users in the USA

Requires validation and certification

Skill will appear in Cortana’s skill listings

Page 13: Microsoft brand template - .NET Framework
Page 14: Microsoft brand template - .NET Framework
Page 15: Microsoft brand template - .NET Framework
Page 16: Microsoft brand template - .NET Framework
Page 17: Microsoft brand template - .NET Framework

var response = context.MakeMessage();

// For display text, use Summary to display large font, italics - this is to// emphasize this is the Skill speaking, not Cortana// Continue the displayed text using the Text property of the response messageresponse.Summary = $"Welcome to the Hotels finder!";response.Text = $"We are analyzing your message: '{(await activity).Text}'...";

// Speak is what is spoken outresponse.Speak = @"<speak version=""1.0"" xml:lang=""en-US"">

Welcome to the Hotels finder!<break time=""1000ms""/></speak>";

// InputHint influences how the microphone behavesresponse.InputHint = InputHints.IgnoringInput;

// Post the response messageawait context.PostAsync(response);

Page 18: Microsoft brand template - .NET Framework

HeroCard heroCard = new HeroCard(){

Title = hotel.Name,Subtitle = $"{hotel.Rating} stars. {hotel.NumberOfReviews} reviews. From ${hotel.PriceStarting} per night.",Images = new List<CardImage>()

{new CardImage() { Url = hotel.Image }

},Buttons = new List<CardAction>()

{new CardAction(){

Title = "More details",Type = ActionTypes.OpenUrl,Value = $"https://www.bing.com/search?q=hotels+in+" + HttpUtility.UrlEncode(hotel.Location)

}}

};

resultMessage.Attachments.Add(heroCard.ToAttachment());

Page 19: Microsoft brand template - .NET Framework
Page 20: Microsoft brand template - .NET Framework

// Add a single media URL for Cortana to playMediaUrl murl = new MediaUrl("https://{yourstreamurl}"); MediaUrl[] medias = new MediaUrl[] {murl};

// Create a new AudioCard and attach your media URLAudioCard audioCard = new AudioCard() { Media = medias, };

// Add the attachment and send the replyAttachment audioCardAttach = audioCard.ToAttachment(); reply.Attachments.Add(audioCardAttach);reply.InputHint = InputHints.AcceptingInput; await connector.Conversations.ReplyToActivityAsync(reply);

Page 21: Microsoft brand template - .NET Framework

[Serializable][LuisModel("YourModelId", "YourSubscriptionKey")]public class RootLuisDialog : LuisDialog<object>{

…[LuisIntent("Help")]public async Task Help(IDialogContext context, LuisResult result){

var response = context.MakeMessage();response.Speak = @"<speak version=""1.0"" xml:lang=""en-US"">Hi! Try asking me" +

"things like 'search for hotels in Seattle' </speak>";response.InputHint = InputHints.ExpectingInput;await context.PostAsync(response);context.Wait(this.MessageReceived);

}

Page 22: Microsoft brand template - .NET Framework
Page 23: Microsoft brand template - .NET Framework
Page 24: Microsoft brand template - .NET Framework
Page 25: Microsoft brand template - .NET Framework
Page 26: Microsoft brand template - .NET Framework

Improved speech recognition for skills Use LUIS intent models to build upon Cortana’s speech recognition

capabilities

New output mechanisms MP3 SSML playback in skill responses

New ways of interacting with skills Use text input to invoke skills

Flexible authentication Skills that can authenticate user mid-stream

General stability updates26

Page 27: Microsoft brand template - .NET Framework

New devices

Page 28: Microsoft brand template - .NET Framework

bool hasDisplay = true;var deviceInfoEntity = context.Activity.AsMessageActivity().Entities

.Where(e => e.Type.Equals("DeviceInfo")).SingleOrDefault();if (deviceInfoEntity != null){

hasDisplay = deviceInfoEntity.Properties.Value<bool>("supportsDisplay");}

if (hasDisplay) …

Page 29: Microsoft brand template - .NET Framework
Page 30: Microsoft brand template - .NET Framework

https://github.com/AndyCW/FutureDecoded2017Samples

https://github.com/AndyCW/RomeMSGraphBot

https://github.com/dorreneb/classic-book-finder-skill

http://aka.ms/CortanaSkillsBuild2017

Get Today’s Skill Code:

30

https://dev.microsoft.com/cortanaBuild Your Own Skill:

Page 31: Microsoft brand template - .NET Framework