Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpProperties::SetPropertyNum
ISpProperties::SetPropertyNum sets a numeric property corresponding to the specified name.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetPropertyNum(</strong> <strong>LPCWSTR</strong> *<em>pName</em>, <strong>LONG</strong> <em>lValue</em> <strong> );</strong> </pre>
Parameters
- pName
[in] Null-terminated string containing the property name. See Modify Speech Recognition Engine Properties for valid values. - lValue
[in] The property value to set.
Return Values
Value | Description |
---|---|
S_OK | Function completed successfully. |
S_FALSE | The speech recognition engine does not support the specified property name. |
E_INVALIDARG | One or more parameters are invalid. |
FAILED(hr) | The speech recognition engine returned a specific error. |
Remarks
If the speech recognition engine supports the property, the Speech Platform will fire a property-changed event (see SPEI_PROPERTY_NUM_CHANGE) to all interested recognizer contexts (ISpRecoContext). Broadcasting the corresponding event notifies any recognizer contexts that had interests in the property (see CSpEvent::PropertyName and CSpEvent::PropertyNumValue).