Skip to content

Commit b8872ff

Browse files
chschraeolmidyChris Schraer
authored
U/olmidy/wav file test generator (#531)
* Update test generator to support WAV file input. Correct debug build parameters * Added code for customizable headers and updated the speechSDK * added DialogData.cs * fixed skipping column * Add header value for ExpectedResponses * Update documentationf for test tool generator. * Push silence to stream in test tool to force segmentation by SR service. * Simplify switch case * refactored dialogData to eliminate warnings. * removed "Type" from the complex object example in docs * fixed other readme example Co-authored-by: Olivier Midy <[email protected]> Co-authored-by: Chris Schraer <[email protected]>
1 parent 12326a3 commit b8872ff

File tree

2 files changed

+62
-15
lines changed

2 files changed

+62
-15
lines changed
Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,65 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
1+
// <copyright file="DialogData.cs" company="PlaceholderCompany">
2+
// Copyright (c) PlaceholderCompany. All rights reserved.
3+
// </copyright>
44

55
namespace VoiceAssistantTestGenerator
66
{
7+
using System;
8+
using System.Collections.Generic;
9+
using System.Text;
10+
11+
/// <summary>
12+
/// This class stores data associated with a Dialog.
13+
/// </summary>
714
public class DialogData
815
{
9-
public string Description = string.Empty;
10-
public bool Skip = false;
11-
public int TurnID = 0;
12-
public int Sleep = 0;
13-
public string WavFile = string.Empty;
14-
public string Utterance = string.Empty;
15-
public string Activity = string.Empty;
16-
public bool Keyword = false;
16+
private string description = string.Empty;
17+
private bool skip = false;
18+
private int turnID = 0;
19+
private int sleep = 0;
20+
private string wavFile = string.Empty;
21+
private string utterance = string.Empty;
22+
private string activity = string.Empty;
23+
private bool keyword = false;
24+
25+
/// <summary>
26+
/// Gets or sets The Description of the dialog.
27+
/// </summary>
28+
public string Description { get => this.description; set => this.description = value; }
29+
30+
/// <summary>
31+
/// Gets or sets a value indicating whether the dialog should be skipped.
32+
/// </summary>
33+
public bool Skip { get => this.skip; set => this.skip = value; }
34+
35+
/// <summary>
36+
/// Gets or sets The TurnID of the dialog.
37+
/// </summary>
38+
public int TurnID { get => this.turnID; set => this.turnID = value; }
39+
40+
/// <summary>
41+
/// Gets or sets a value indicating how long to sleep before beginning the Dialog.
42+
/// </summary>
43+
public int Sleep { get => this.sleep; set => this.sleep = value; }
44+
45+
/// <summary>
46+
/// Gets or sets a value indicating the WavFile to be read.
47+
/// </summary>
48+
public string WavFile { get => this.wavFile; set => this.wavFile = value; }
49+
50+
/// <summary>
51+
/// Gets or sets a value indicating the utterance to use as a message to the service.
52+
/// </summary>
53+
public string Utterance { get => this.utterance; set => this.utterance = value; }
54+
55+
/// <summary>
56+
/// Gets or sets a value indicating the activity to send to the service.
57+
/// </summary>
58+
public string Activity { get => this.activity; set => this.activity = value; }
59+
60+
/// <summary>
61+
/// Gets or sets a value indicating whether we should use keyword listening or not.
62+
/// </summary>
63+
public bool Keyword { get => this.keyword; set => this.keyword = value; }
1764
}
1865
}

clients/csharp-dotnet-core/voice-assistant-test-generator/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ Each column's header should specify the schema of that property. Currently all v
5656
It is supported to have in depth objects. Currently if no braces are specified all properties are expected to be in the top level of the received activity. If you wish to specify depth simply add an opening brace to the object that has depth and closing brace to the last element.
5757

5858
```
59-
Utterance | type | ExpectedResponses | complexObject{ | subProperty1 | subObject2{ | subSubProperty1} | subProperty3}
59+
Utterance | ExpectedResponses | complexObject{ | subProperty1 | subObject2{ | subSubProperty1} | subProperty3}
6060
```
6161

6262
Example test file ( '|' represents a tab). This test file defines messages that expect to correctly be interpreted to set a timer for 30 seconds and the service returns an activity with the extracted information as well as an added field about what the alarm should be.
6363

6464
```
65-
Utterance | Sleep | Keyword | type | ExpectedResponses | details{ | duration | alarm}
66-
Set a timer for 30 seconds | 200 | false | timer | | | "30" | "audible"
67-
Make a timer for 30 seconds | 200 | false | timer | | | "30" | "audible"
65+
Utterance | Sleep | Keyword | ExpectedResponses | type | details{ | duration | alarm}
66+
Set a timer for 30 seconds | 200 | false | | timer | | | "30" | "audible"
67+
Make a timer for 30 seconds | 200 | false | | timer | | | "30" | "audible"
6868
```

0 commit comments

Comments
 (0)