The VerifyUserKeyword method is used by the training user experience to verify that one instance of a spoken utterance, captured during training, matches a predefined keyword within some tolerance.
HRESULT VerifyUserKeyword( IStream *ModelData, KEYWORDID KeywordId, LANGID LangId, LONG KeywordEndBytePos, IMFMediaBuffer *UserRecording );
A pointer to an IStream object bound to model data for a given stored model. On the initial call this will be empty.
The KEYWORDID in the UserRecording parameter.
The LANGID of the spoken language in the UserRecording parameter.
Indicates the end of the keyword in the UserRecording.
A pointer to the buffer containing the raw data in the appropriate IMFMediaType format.
The user recording must have the following attributes:
- Type = Audio
- Subtype = IEEE_FLOAT
- Sampling Rate = 16 kHz
- Bits = 32
This method can return one of these values.
||The function exited successfully.|
||User keyword training is not supported for the device.|
One or more of the following conditions are true:
||The user recording didn't contain the specified keyword.|
Note that audio is processed in a unique way for voice activation training. The following table summarizes the differences between voice activation training and the regular voice recognition usage.
|Audio Format||32-bit float (Type = Audio, Subtype = IEEE_FLOAT, Sampling Rate = 16 kHz, bits = 32)||Managed by OS audio stack|
|Mic||Mic 0||All mics in array|
|Minimum supported client||Windows 10|
|Minimum supported server||Windows Server 2016|