SpeechGrammarSet class

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

Syntax

public sealed class SpeechGrammarSet : IReadOnlyDictionary<String, SpeechGrammar>,
    IEnumerable<KeyValuePair>
Public NotInheritable Class SpeechGrammarSet
    Implements IReadOnlyDictionary(Of String, SpeechGrammar), _
    IEnumerable(Of KeyValuePair)
public ref class SpeechGrammarSet sealed : IMapView<String, SpeechGrammar>,
    IIterable<IKeyValuePair>

Members

The SpeechGrammarSet class has these types of members:

  • Methods
  • Properties

Methods

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

Method Description
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.

Property Access type Description

Count [C#, VB]

Read-only

Gets the number of elements contained in the collection.

Item [C#, VB]

Read-only

Gets the element value at the specified key index.

Keys [C#, VB]

Read-only

Gets an enumerable set containing the keys of the SpeechGrammarSet.

Size [C++, JavaScript]

Read-only

Gets the number of grammars associated with the speech grammar set.

Values [C#, VB]

Read-only

Gets 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

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

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]

Attributes

[MarshalingBehavior(Agile)]

[Version(0x06020000)]

See also

Object

IMapView(String, SpeechGrammar)

IIterable(IKeyValuePair)