GrammarBuilder.Append 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
문법 요소의 현재 시퀀스에 문법 요소를 추가합니다.
오버로드
| Name | Description |
|---|---|
| Append(String, Int32, Int32) |
문법 요소의 현재 시퀀스에 반복되는 구를 추가합니다. |
| Append(GrammarBuilder, Int32, Int32) |
반복되는 문법 요소를 문법 요소의 현재 시퀀스에 추가합니다. |
| Append(String) |
문법 요소의 현재 시퀀스에 구를 추가합니다. |
| Append(String, SubsetMatchingMode) |
구의 하위 집합에 대한 요소를 문법 요소의 현재 시퀀스에 추가합니다. |
| Append(SemanticResultKey) |
문법 요소의 현재 시퀀스에 의미 체계 키를 추가합니다. |
| Append(SemanticResultValue) |
문법 요소의 현재 시퀀스에 의미 체계 값을 추가합니다. |
| Append(GrammarBuilder) |
문법 요소의 현재 시퀀스에 문법 요소를 추가합니다. |
| Append(Choices) |
문법 요소의 현재 시퀀스에 대한 대안 집합을 추가합니다. |
설명
이러한 메서드를 사용하여 기존에 문법 요소를 추가합니다 GrammarBuilder. 문법 요소를 만들 때 기존 작성기를 추가하여 음성 인식 문법에 대한 제약 조건을 점진적으로 개발할 수 있습니다. 각 요소는 요소의 현재 시퀀스의 끝에 추가됩니다.
이 메서드에는 추가GrammarBuilder, , StringChoices및 SemanticResultKey개체에 대한 오버로드가 있습니다SemanticResultValue.
중요합니다
음성 인식기 동일한 키 이름 또는 동일한 의미 체계 요소의 값을 반복적으로 수정할 수 있는 여러 의미 체계 요소를 사용 하 여 중복 된 의미 체계 요소를 포함 하는 음성 인식 문법을 사용 하는 경우 예외를 throw할 수 있습니다.
음성 인식 문법을 빌드하고 사용하는 방법에 대한 자세한 내용은 음성 인식을 참조하세요.
Append(String, Int32, Int32)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 반복되는 구를 추가합니다.
public:
void Append(System::String ^ phrase, int minRepeat, int maxRepeat);
public void Append(string phrase, int minRepeat, int maxRepeat);
member this.Append : string * int * int -> unit
Public Sub Append (phrase As String, minRepeat As Integer, maxRepeat As Integer)
매개 변수
- phrase
- String
추가할 반복된 단어 시퀀스입니다.
- minRepeat
- Int32
일치 항목을 구성하기 위해 입력 일치 phrase 가 발생해야 하는 최소 횟수입니다.
- maxRepeat
- Int32
일치 항목을 구성하기 위해 입력 일치 phrase 가 발생할 수 있는 최대 횟수입니다.
예제
다음 예제에서는 "직장에서 James에게 전화", "휴대폰에서 Anne에게 전화"와 같은 구문에 대한 음성 인식 문법을 만듭니다. 여기서 단어 "phone"은 선택 사항입니다. GrammarBuilder 및 Choices 개체는 문법을 생성하는 데 사용됩니다. 이 예제에서는 메서드의 사용을 강조 표시합니다 Append .
public static Grammar CreatePhonePhrase()
{
// Create alternatives for person names, locations, devices, and pronouns.
Choices personChoice = new Choices(new string[] {"Anne", "James", "Mary", "Sam"});
Choices locationChoice = new Choices(new string[] {"home", "work"});
Choices deviceChoice = new Choices(new string[] {"home", "work", "cell"});
Choices pronounChoice = new Choices(new string[] {"his", "her"});
// Create a phrase for the receiving device, which optionally contains the word "phone".
GrammarBuilder devicePhrase = new GrammarBuilder(pronounChoice);
devicePhrase.Append(deviceChoice);
devicePhrase.Append("phone", 0, 1);
// Create alternatives for phrases specifying a device or a location.
GrammarBuilder atLocation = new GrammarBuilder("at");
atLocation.Append(locationChoice);
GrammarBuilder onDevice = new GrammarBuilder("on");
onDevice.Append(devicePhrase);
Choices howChoice = new Choices(new GrammarBuilder[] {atLocation, onDevice});
// Build the final phrase.
GrammarBuilder callWho = new GrammarBuilder("Call");
callWho.Append(personChoice);
callWho.Append(howChoice);
// Create the Grammar object.
Grammar callGrammar = new Grammar(callWho);
callGrammar.Name = "Call Grammar";
return callGrammar;
}
설명
값 minRepeat 은 0보다 크거나 같아야 하며 값보다 작거나 같 maxRepeat아야 합니다.
추가 정보
적용 대상
Append(GrammarBuilder, Int32, Int32)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
반복되는 문법 요소를 문법 요소의 현재 시퀀스에 추가합니다.
public:
void Append(System::Speech::Recognition::GrammarBuilder ^ builder, int minRepeat, int maxRepeat);
public void Append(System.Speech.Recognition.GrammarBuilder builder, int minRepeat, int maxRepeat);
member this.Append : System.Speech.Recognition.GrammarBuilder * int * int -> unit
Public Sub Append (builder As GrammarBuilder, minRepeat As Integer, maxRepeat As Integer)
매개 변수
- builder
- GrammarBuilder
추가할 반복 문법 요소입니다.
- minRepeat
- Int32
일치 항목을 구성하기 위해 정의된 builder 요소와 일치하는 입력이 발생해야 하는 최소 횟수입니다.
- maxRepeat
- Int32
정의된 builder 요소와 일치하는 입력이 일치를 구성하기 위해 발생할 수 있는 최대 횟수입니다.
예제
다음 예제에서는 "직장에서 James에게 전화", "휴대폰에서 Anne에게 전화"와 같은 구문에 대한 음성 인식 문법을 만듭니다. 여기서 단어 "phone"은 선택 사항입니다. GrammarBuilder 및 Choices 개체는 문법을 생성하는 데 사용됩니다. 이 예제에서는 메서드의 사용을 강조 표시합니다 Append .
public static Grammar CreatePhonePhrase()
{
// Create alternatives for person names, locations, devices, and pronouns.
Choices personChoice = new Choices(new string[] {"Anne", "James", "Mary", "Sam"});
Choices locationChoice = new Choices(new string[] {"home", "work"});
Choices deviceChoice = new Choices(new string[] {"home", "work", "cell"});
Choices pronounChoice = new Choices(new string[] {"his", "her"});
// Create a phrase for the receiving device, which optionally contains the word "phone".
GrammarBuilder devicePhrase = new GrammarBuilder(pronounChoice);
devicePhrase.Append(deviceChoice);
devicePhrase.Append("phone", 0, 1);
// Create alternatives for phrases specifying a device or a location.
GrammarBuilder atLocation = new GrammarBuilder("at");
atLocation.Append(locationChoice);
GrammarBuilder onDevice = new GrammarBuilder("on");
onDevice.Append(devicePhrase);
Choices howChoice = new Choices(new GrammarBuilder[] {atLocation, onDevice});
// Build the final phrase.
GrammarBuilder callWho = new GrammarBuilder("Call");
callWho.Append(personChoice);
callWho.Append(howChoice);
// Create the Grammar object.
Grammar callGrammar = new Grammar(callWho);
callGrammar.Name = "Call Grammar";
return callGrammar;
}
설명
값 minRepeat 은 0보다 크거나 같아야 하며 값보다 작거나 같 maxRepeat아야 합니다.
중요합니다
개체 또는 SemanticResultKey 인스턴스를 포함하는 SemanticResultValue 개체를 추가할 GrammarBuilder 때는 동일한 키 이름 또는 개체의 속성을 SemanticValue 반복적으로 수정 Value 할 GrammarBuilder 수 있는 여러 의미 체계 요소를 사용하여 중복 의미 체계 요소를 만들지 않도록 해야 합니다. 이러한 상황이 발생하면 음성 인식기가 예외를 throw할 수 있습니다.
추가 정보
적용 대상
Append(String)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 구를 추가합니다.
public:
void Append(System::String ^ phrase);
public void Append(string phrase);
member this.Append : string -> unit
Public Sub Append (phrase As String)
매개 변수
- phrase
- String
추가할 단어의 시퀀스입니다.
설명
phrase 는 요소의 현재 시퀀스의 끝에 추가됩니다.
추가 정보
적용 대상
Append(String, SubsetMatchingMode)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
구의 하위 집합에 대한 요소를 문법 요소의 현재 시퀀스에 추가합니다.
public:
void Append(System::String ^ phrase, System::Speech::Recognition::SubsetMatchingMode subsetMatchingCriteria);
public void Append(string phrase, System.Speech.Recognition.SubsetMatchingMode subsetMatchingCriteria);
member this.Append : string * System.Speech.Recognition.SubsetMatchingMode -> unit
Public Sub Append (phrase As String, subsetMatchingCriteria As SubsetMatchingMode)
매개 변수
- phrase
- String
추가할 단어의 시퀀스입니다.
- subsetMatchingCriteria
- SubsetMatchingMode
문법에서 구를 인식하는 데 사용하는 일치 모드입니다.
예제
다음 예제에서는 각 SubsetMatchingMode 값에 대해 음성 인식 문법을 만듭니다. 예를 들어 생성된 문법 OrderedSubset 은 "three four five" 및 "one three five"라는 구를 인식하고 문법 Subsequence 은 "345"라는 구를 인식하지만 구는 인식하지 않습니다.
private Grammar[] CreateSubsetMatchTest()
{
List<Grammar> grammars = new List<Grammar>(4);
string phrase = "one two three four five six";
foreach (SubsetMatchingMode mode in
Enum.GetValues(typeof(SubsetMatchingMode)))
{
GrammarBuilder gb = new GrammarBuilder();
gb.Append(phrase, mode);
Grammar grammar = new Grammar(gb);
grammar.Name = mode.ToString();
grammars.Add(grammar);
}
return grammars.ToArray();
}
설명
하위 집합 요소는 요소의 현재 시퀀스의 끝에 추가됩니다. 문자열을 사용하여 음성 인식 문법을 빌드하는 방법에 대한 자세한 내용은 문자열을 사용하여 GrammarBuilder 문법 만들기를 참조하세요.
하위 집합 일치 모드 사용에 대한 자세한 내용은 다음을 참조하세요 System.Speech.Recognition.SubsetMatchingMode.
추가 정보
적용 대상
Append(SemanticResultKey)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 의미 체계 키를 추가합니다.
public:
void Append(System::Speech::Recognition::SemanticResultKey ^ key);
public void Append(System.Speech.Recognition.SemanticResultKey key);
member this.Append : System.Speech.Recognition.SemanticResultKey -> unit
Public Sub Append (key As SemanticResultKey)
매개 변수
추가할 의미 체계 키입니다.
예제
다음 예제는 항공편의 출발지 및 목적지 도시를 선택하는 콘솔 애플리케이션의 일부입니다. 애플리케이션은 "마이애미에서 시카고로 비행하고 싶다"와 같은 문구를 인식합니다. 이벤트의 처리기는 SpeechRecognized 원본 및 대상 도시에 지정된 SemanticResultValue 공항 코드를 추출하는 데 사용합니다SemanticResultKey.
using System;
using System.Speech.Recognition;
namespace SampleRecognition
{
class Program
{
static void Main(string[] args)
// Initialize an in-process speech recognition engine.
{
using (SpeechRecognitionEngine recognizer =
new SpeechRecognitionEngine())
{
// Create a Choices object and add cities and airport codes
// using SemanticResultValue objects.
Choices cities = new Choices();
cities.Add(new SemanticResultValue("Chicago", "ORD"));
cities.Add(new SemanticResultValue("Boston", "BOS"));
cities.Add(new SemanticResultValue("Miami", "MIA"));
cities.Add(new SemanticResultValue("Dallas", "DFW"));
// Build the phrase and add SemanticResultKeys.
GrammarBuilder chooseCities = new GrammarBuilder();
chooseCities.Append("I want to fly from");
chooseCities.Append(new SemanticResultKey("origin", cities));
chooseCities.Append("to");
chooseCities.Append(new SemanticResultKey("destination", cities));
// Build a Grammar object from the GrammarBuilder.
Grammar bookFlight = new Grammar(chooseCities);
bookFlight.Name = "Book Flight";
// Add a handler for the LoadGrammarCompleted event.
recognizer.LoadGrammarCompleted +=
new EventHandler<LoadGrammarCompletedEventArgs>(recognizer_LoadGrammarCompleted);
// Add a handler for the SpeechRecognized event.
recognizer.SpeechRecognized +=
new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);
// Configure the input to the recognizer.
recognizer.SetInputToDefaultAudioDevice();
// Load the grammar object and start recognition.
recognizer.LoadGrammarAsync(bookFlight);
recognizer.RecognizeAsync();
// Keep the console window open.
Console.ReadLine();
}
}
// Handle the LoadGrammarCompleted event.
static void recognizer_LoadGrammarCompleted(object sender, LoadGrammarCompletedEventArgs e)
{
Console.WriteLine("Grammar loaded: " + e.Grammar.Name);
Console.WriteLine();
}
// Handle the SpeechRecognized event.
static void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
Console.WriteLine("Speech recognized: " + e.Result.Text);
Console.WriteLine();
Console.WriteLine("Semantic results:");
Console.WriteLine(" The flight origin is " + e.Result.Semantics["origin"].Value);
Console.WriteLine(" The flight destination is " + e.Result.Semantics["destination"].Value);
}
}
}
설명
key 는 요소의 현재 시퀀스의 끝에 추가됩니다.
중요합니다
개체에 인스턴스 또는 SemanticResultKey 인스턴스를 추가할 SemanticResultValue 때 동일한 키 이름 또는 개체의 속성을 SemanticValue 반복적으로 수정 Value 할 GrammarBuilder 수 있는 여러 의미 체계 요소를 사용하여 중복 의미 체계 요소를 만들지 않도록 해야 합니다. 이러한 상황이 발생하면 음성 인식기가 예외를 throw할 수 있습니다.
추가 정보
적용 대상
Append(SemanticResultValue)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 의미 체계 값을 추가합니다.
public:
void Append(System::Speech::Recognition::SemanticResultValue ^ value);
public void Append(System.Speech.Recognition.SemanticResultValue value);
member this.Append : System.Speech.Recognition.SemanticResultValue -> unit
Public Sub Append (value As SemanticResultValue)
매개 변수
- value
- SemanticResultValue
추가할 의미 체계 값입니다.
예제
다음 예제는 항공편의 출발지 및 목적지 도시를 선택하는 콘솔 애플리케이션의 일부입니다. 애플리케이션은 "마이애미에서 시카고로 비행하고 싶다"와 같은 문구를 인식합니다. 이벤트의 처리기는 SpeechRecognized 원본 및 대상 도시에 지정된 SemanticResultValue 공항 코드를 추출하는 데 사용합니다SemanticResultKey.
using System;
using System.Speech.Recognition;
namespace SampleRecognition
{
class Program
{
static void Main(string[] args)
// Initialize an in-process speech recognition engine.
{
using (SpeechRecognitionEngine recognizer =
new SpeechRecognitionEngine())
{
// Create GrammarBuilder objects and append SemanticResultValue objects
// that contain cities and airport codes.
GrammarBuilder chicago = new GrammarBuilder();
chicago.Append(new SemanticResultValue("Chicago", "ORD"));
GrammarBuilder boston = new GrammarBuilder();
boston.Append(new SemanticResultValue("Boston", "BOS"));
GrammarBuilder miami = new GrammarBuilder();
miami.Append(new SemanticResultValue("Miami", "MIA"));
GrammarBuilder dallas = new GrammarBuilder();
dallas.Append(new SemanticResultValue("Dallas", "DFW"));
// Create a Choices object and add the cities using implicit conversion from
// SemanticResultValue to GrammarBuilder.
Choices cities = new Choices();
cities.Add(new Choices(new GrammarBuilder[] { chicago, boston, miami, dallas }));
// Build the phrase and add SemanticResultKeys.
GrammarBuilder chooseCities = new GrammarBuilder();
chooseCities.Append("I want to fly from");
chooseCities.Append(new SemanticResultKey("origin", cities));
chooseCities.Append("to");
chooseCities.Append(new SemanticResultKey("destination", cities));
// Build a Grammar object from the GrammarBuilder.
Grammar bookFlight = new Grammar(chooseCities);
bookFlight.Name = "Book Flight";
// Add a handler for the LoadGrammarCompleted event.
recognizer.LoadGrammarCompleted +=
new EventHandler<LoadGrammarCompletedEventArgs>(recognizer_LoadGrammarCompleted);
// Add a handler for the SpeechRecognized event.
recognizer.SpeechRecognized +=
new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);
// Configure the input to the recognizer.
recognizer.SetInputToDefaultAudioDevice();
// Load the grammar object and start recognition.
recognizer.LoadGrammarAsync(bookFlight);
recognizer.RecognizeAsync();
// Keep the console window open.
Console.ReadLine();
}
}
// Handle the LoadGrammarCompleted event.
static void recognizer_LoadGrammarCompleted(object sender, LoadGrammarCompletedEventArgs e)
{
Console.WriteLine("Grammar loaded: " + e.Grammar.Name);
Console.WriteLine();
}
// Handle the SpeechRecognized event.
static void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
Console.WriteLine("Speech recognized: " + e.Result.Text);
Console.WriteLine();
Console.WriteLine("Semantic results:");
Console.WriteLine(" The flight origin is " + e.Result.Semantics["origin"].Value);
Console.WriteLine(" The flight destination is " + e.Result.Semantics["destination"].Value);
}
}
}
설명
value 는 요소의 현재 시퀀스의 끝에 추가됩니다.
중요합니다
개체에 인스턴스 또는 SemanticResultKey 인스턴스를 추가할 SemanticResultValue 때 동일한 키 이름 또는 개체의 속성을 SemanticValue 반복적으로 수정 Value 할 GrammarBuilder 수 있는 여러 의미 체계 요소를 사용하여 중복 의미 체계 요소를 만들지 않도록 해야 합니다. 이러한 상황이 발생하면 음성 인식기가 예외를 throw할 수 있습니다.
추가 정보
적용 대상
Append(GrammarBuilder)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 문법 요소를 추가합니다.
public:
void Append(System::Speech::Recognition::GrammarBuilder ^ builder);
public void Append(System.Speech.Recognition.GrammarBuilder builder);
member this.Append : System.Speech.Recognition.GrammarBuilder -> unit
Public Sub Append (builder As GrammarBuilder)
매개 변수
- builder
- GrammarBuilder
추가할 문법 요소입니다.
예제
다음 예제에서는 "직장에서 James에게 전화", "휴대폰에서 Anne에게 전화"와 같은 구문에 대한 음성 인식 문법을 만듭니다. 여기서 단어 "phone"은 선택 사항입니다. GrammarBuilder 및 Choices 개체는 문법을 생성하는 데 사용됩니다. 이 예제에서는 메서드의 사용을 강조 표시합니다 Append .
public static Grammar CreatePhonePhrase()
{
// Create alternatives for person names, locations, devices, and pronouns.
Choices personChoice = new Choices(new string[] {"Anne", "James", "Mary", "Sam"});
Choices locationChoice = new Choices(new string[] {"home", "work"});
Choices deviceChoice = new Choices(new string[] {"home", "work", "cell"});
Choices pronounChoice = new Choices(new string[] {"his", "her"});
// Create a phrase for the receiving device, which optionally contains the word "phone".
GrammarBuilder devicePhrase = new GrammarBuilder(pronounChoice);
devicePhrase.Append(deviceChoice);
devicePhrase.Append("phone", 0, 1);
// Create alternatives for phrases specifying a device or a location.
GrammarBuilder atLocation = new GrammarBuilder("at");
atLocation.Append(locationChoice);
GrammarBuilder onDevice = new GrammarBuilder("on");
onDevice.Append(devicePhrase);
Choices howChoice = new Choices(new GrammarBuilder[] {atLocation, onDevice});
// Build the final phrase.
GrammarBuilder callWho = new GrammarBuilder("Call");
callWho.Append(personChoice);
callWho.Append(howChoice);
// Create the Grammar object.
Grammar callGrammar = new Grammar(callWho);
callGrammar.Name = "Call Grammar";
return callGrammar;
}
설명
builder 는 문법 요소의 현재 시퀀스의 끝에 추가됩니다.
메모
개체 또는 SemanticResultKey 인스턴스를 포함하는 SemanticResultValue 개체를 추가할 GrammarBuilder 때는 동일한 키 이름 또는 개체의 속성을 SemanticValue 반복적으로 수정 Value 할 GrammarBuilder 수 있는 여러 의미 체계 요소를 사용하여 중복 의미 체계 요소를 만들지 않도록 해야 합니다. 이러한 상황이 발생하면 음성 인식기가 예외를 throw할 수 있습니다.
추가 정보
적용 대상
Append(Choices)
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
- Source:
- GrammarBuilder.cs
문법 요소의 현재 시퀀스에 대한 대안 집합을 추가합니다.
public:
void Append(System::Speech::Recognition::Choices ^ alternateChoices);
public void Append(System.Speech.Recognition.Choices alternateChoices);
member this.Append : System.Speech.Recognition.Choices -> unit
Public Sub Append (alternateChoices As Choices)
매개 변수
- alternateChoices
- Choices
추가할 대안 집합입니다.
예제
다음 예제에서는 "직장에서 James에게 전화", "휴대폰에서 Anne에게 전화"와 같은 구문에 대한 음성 인식 문법을 만듭니다. 여기서 단어 "phone"은 선택 사항입니다. 이 예제에서는 메서드의 사용을 강조 표시합니다 Append .
public static Grammar CreatePhonePhrase()
{
// Create alternatives for person names, locations, devices, and pronouns.
Choices personChoice = new Choices(new string[] {"Anne", "James", "Mary", "Sam"});
Choices locationChoice = new Choices(new string[] {"home", "work"});
Choices deviceChoice = new Choices(new string[] {"home", "work", "cell"});
Choices pronounChoice = new Choices(new string[] {"his", "her"});
// Create a phrase for the receiving device, which optionally contains the word "phone".
GrammarBuilder devicePhrase = new GrammarBuilder(pronounChoice);
devicePhrase.Append(deviceChoice);
devicePhrase.Append("phone", 0, 1);
// Create alternatives for phrases specifying a device or a location.
GrammarBuilder atLocation = new GrammarBuilder("at");
atLocation.Append(locationChoice);
GrammarBuilder onDevice = new GrammarBuilder("on");
onDevice.Append(devicePhrase);
Choices howChoice = new Choices(new GrammarBuilder[] {atLocation, onDevice});
// Build the final phrase.
GrammarBuilder callWho = new GrammarBuilder("Call");
callWho.Append(personChoice);
callWho.Append(howChoice);
// Create the Grammar object.
Grammar callGrammar = new Grammar(callWho);
callGrammar.Name = "Call Grammar";
return callGrammar;
}
설명
alternateChoices 는 요소의 현재 시퀀스의 끝에 추가됩니다.
중요합니다
개체 또는 SemanticResultKey 인스턴스를 포함하는 SemanticResultValue 개체를 추가할 Choices 때는 동일한 키 이름 또는 개체의 속성을 SemanticValue 반복적으로 수정 Value 할 GrammarBuilder 수 있는 여러 의미 체계 요소를 사용하여 중복 의미 체계 요소를 만들지 않도록 해야 합니다. 이러한 상황이 발생하면 음성 인식기가 예외를 throw할 수 있습니다.