Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
SrgsDocument.Culture Property
Gets or sets the culture information for the SrgsDocument instance.
Namespace: Microsoft.Speech.Recognition.SrgsGrammar
Assembly: Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
'Declaration
Public Property Culture As CultureInfo
Get
Set
'Usage
Dim instance As SrgsDocument
Dim value As CultureInfo
value = instance.Culture
instance.Culture = value
public CultureInfo Culture { get; set; }
Property Value
Type: System.Globalization.CultureInfo
Returns the current culture information for the SrgsDocument.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The value being assigned to Culture is a null reference (Nothing in Visual Basic). |
ArgumentException | The value being assigned to Culture is InvariantCulture. |
Remarks
The Culture property sets the single culture for the grammar defined in the SrgsDocument object.
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 Runtime Language 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.