SpeechGrammarSet class

Applies to Windows Phone only

Represents a collection of grammars that are associated with a SpeechRecognizer or SpeechRecognizerUI instance.

Syntax


public ref class SpeechGrammarSet sealed : IMapView<String, SpeechGrammar>,
    IIterable<IKeyValuePair>

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The SpeechGrammarSet class has these types of members:

Methods

The SpeechGrammarSet class has these methods. It also inherits methods from the Object class.

MethodDescription
AddGrammarFromList Creates a SpeechGrammar object by using a string array of values, and adds it to the speech grammar set.
AddGrammarFromPredefinedType Creates a SpeechGrammar object by using a pre-defined grammar type, and adds it to the speech grammar set.
AddGrammarFromUri Creates a SpeechGrammar object by using a SGRS grammar file, and adds it to the speech grammar set.
Clear Removes all SpeechGrammar objects from the speech grammar set.
ContainsKey [C#, VB]Returns a value that indicates whether a specified key exists in the SpeechGrammarSet.
First [C++, JavaScript]Returns the first grammar in the grammar set.
HasKey [C++, JavaScript]Determines whether the speech grammar set contains a specific grammar.
Lookup [C++, JavaScript]Returns a grammar associated with a speech grammar set.
Split [C++, JavaScript]Splits the map view of the speech grammar set into two map views.
TryGetValue [C#, VB]Returns a value that indicates whether a specified key exists in the SpeechGrammarSet. If an item with that key exists, the item is retrieved as an out parameter.

 

Properties

The SpeechGrammarSet class has these properties.

PropertyAccess typeDescription

Count [C#, VB]

Read-onlyGets the number of elements contained in the collection.

Item [C#, VB]

Read-onlyGets the element value at the specified key index.

Keys [C#, VB]

Read-onlyGets an enumerable set containing the keys of the SpeechGrammarSet.

Size [C++, JavaScript]

Read-onlyGets the number of grammars associated with the speech grammar set.

Values [C#, VB]

Read-onlyGets an enumerable set containing the values of the SpeechGrammarSet.

 

Remarks

It is not possible to directly instantiate the SpeechGrammarSet class.

Requirements

Minimum supported client

None supported [Windows Store apps only]

Minimum supported server

None supported [Windows Store apps only]

Minimum supported phone

Windows Phone 8

End of phone support

Windows Phone 8.1 [Windows Phone Silverlight 8.1 apps only]

Namespace

Windows.Phone.Speech.Recognition
Windows::Phone::Speech::Recognition [C++]

Metadata

Windows.winmd

Capabilities

ID_CAP_SPEECH_RECOGNITION [Windows Phone]
ID_CAP_MICROPHONE [Windows Phone]
ID_CAP_NETWORKING [Windows Phone]

See also

Object
IMapView(String, SpeechGrammar)
IIterable(IKeyValuePair)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft