VendorPreferred Attribute SAPI 5.4
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 SAPI, the programmer would want to know what the default engine is for the current user. If the user has already chosen one, or the system administrator has set one up, that default is used and the VendorPreferred key is never evaluated. If no default is available, SAPI selects one based on, among other values, VendorPreferred.
For SAPI 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, SAPI automatically selects one. In any case, the selected token becomes the default for that category.
This process only applies if the user has not already chosen a default. Once the user chooses a default, 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, a user 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.