Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

GrammarBuilder.Culture Property

Gets or sets the culture of the grammar.

Namespace:  Microsoft.Speech.Recognition
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Property Culture As CultureInfo
    Get
    Set
'Usage
Dim instance As GrammarBuilder
Dim value As CultureInfo

value = instance.Culture

instance.Culture = value
public CultureInfo Culture { get; set; }

Property Value

Type: System.Globalization.CultureInfo
A CultureInfo object that represents the culture of the grammar.

Remarks

The Culture property of the GrammarBuilder is the only way to set the culture of a Grammar object that was constructed from a GrammarBuilder instance.

The Microsoft Speech Platform SDK 11 accepts all valid language-country codes as values for Culture. For a given language code specified in the Culture property, a speech recognition engine that supports that language code must be installed for the grammar to be loaded successfully.

If the Culture property specifies only a language code, (such as "en" for English or "es" for Spanish), and not a country/region code, then any installed recognizer that expresses support for that generic, region-independent language will be able to load the grammar. See Language Identifier Constants and Strings for a comprehensive list of language codes.

A recognizer is an installed Runtime Language for speech recognition. The Microsoft Speech Platform Runtime 11 and Microsoft Speech Platform SDK 11 do not include any Runtime Languages for speech recognition. You must download and install a Runtime Language for each language in which you want to recognize speech. A Runtime Language includes the language model, acoustic model, and other data necessary to provision a speech engine to perform speech recognition in a particular language. See InstalledRecognizers() for more information.

The Runtime Languages are different for each version of the Speech Platform Runtime. You must download the Runtime Language version that matches the version of the Speech Platform Runtime that you have installed. The Runtime Languages for the Speech Platform SDK 11 are redistributable and are different than the languages that ship with Windows Vista or Windows 7. Use the following link to download Runtime Languages for version 11 of the Speech Platform Runtime:

See Language Support for a list of languages for which you can download Runtime Languages.

See Also

Reference

GrammarBuilder Class

GrammarBuilder Members

Microsoft.Speech.Recognition Namespace