Share via


Note

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

Microsoft Speech Platform

VendorPreferred Attribute

VendorPreferred is an attribute used by a token. The token may be for either a speech recognition (SR) engine or a text-to-speech (TTS) voice. It indicates that the vendor has a preference for a particular token if the vendor has more than one token installed, and that all tokens satisfy other requirements. However, this preference is considered only if the system does not already have a default selected.

For example, a TTS system may have three voices installed by the same vendor: Mike, Mary, and Sam. At various points in the application or in the Microsoft Speech Platform, the programmer would want to know what the default engine is for the current user. If a default has been set up in the registry, (HKEY_CURRENT_USER\Software\Microsoft\Speech Server\v11.0\Voices\DefaultTokenId), that default is used and the VendorPreferred key is never evaluated. If no default has been specified, the Speech Platform selects one based on, among other values, VendorPreferred.

For the Speech Platform to select a default, the language of the user (which can be retrieved by SpGetUserDefaultUILanguage) is considered first. If a specific provider has multiple tokens installed, which all support the specified language, the one marked VendorPreferred becomes the default. Only one token should be marked as the VendorPreferred; however, if more than one is marked, the Speech Platform automatically selects one. In any case, the selected token becomes the default for that category.

This process only applies if a default has not been set up in the registry. If a default has been set up in the registry, VendorPreferred is not looked at further. However, a caller can also use the VendorPreferred attribute to look for a match for a specific vendor. For example, an application could call SpEnumTokens(SPCAT_VOICES, L"Vendor=Microsoft;VendorPreferred", ...) to ensure that they get Microsoft's pick for their voice, or similarly for the SR engine.

See Also

Using Object Tokens and Categories