Skip to content

Commit 12df914

Browse files
committed
type is requested with DLS client update
1 parent 722f0f0 commit 12df914

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

articles/cognitive-services/Speech-Service/how-to-custom-speech-commands-fulfill-sdk.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ This article describes, step by step, how to make a client application to talk t
5656
5757
```json
5858
{
59+
"type": "event",
5960
"name": "UpdateDeviceState",
6061
"state": "{OnOff}",
6162
"device": "{SubjectDevice}"
@@ -100,12 +101,11 @@ connector.ActivityReceived += async (sender, activityReceivedEventArgs) =>
100101
NotifyUser($"Activity received, hasAudio={activityReceivedEventArgs.HasAudio} activity={activityReceivedEventArgs.Activity}");
101102

102103
dynamic activity = JsonConvert.DeserializeObject(activityReceivedEventArgs.Activity);
103-
var payload = activity?.Value;
104104

105-
if(payload?.name == "SetDeviceState")
105+
if(activity?.name == "SetDeviceState")
106106
{
107-
var state = payload?.state;
108-
var device = payload?.device;
107+
var state = activity?.state;
108+
var device = activity?.device;
109109
switch(device)
110110
{
111111
case "tv":
10.5 KB
Loading

0 commit comments

Comments
 (0)