LVSpeechPort::SetPropertyEx
Sets various properties for a port, client, soundchannel, or grammar.
int SetPropertyEx(int propertyname, int valuetype, void* pvalue,
int target = PROP_EX_TARGET_PORT, intindex = 0 );
Return Values
Zero (0) or greater indicates success; property is set to the value pointed to by pvalue.
A negative result indicates a specific error:
-2: LV_SYSTEM_ERROR: An exception occured while setting the property
-11: LV_INVALID_PROPERTY_VALUE: The value is invalid for the designated property (e.g. out of range).
-15: LV_INVALID_PROPERTY_TARGET: The property cannot be set for the specified target.
-16: LV_INVALID_PROPERTY_VALUE_TYPE: The property's type is incompatible with the declared type.
-17: LV_INVALID_PROPERTY: The property does not exist.
-18: LV_INVALID_PROPERTY_TARGET_NDX: The target's index (grammar set, voicechannel) is out of range for this property.
Note: If more than one error occurs, which error code is returned is undefined.
Parameters
propertyname
Which property to modify.
valuetype
The value type of the property being set. Legal values are:
-
PROP_EX_VALUE_TYPE_INT
-
PROP_EX_VALUE_TYPE_INT_PTR
-
PROP_EX_VALUE_TYPE_STRING
-
PROP_EX_VALUE_TYPE_FLOAT_PTR
Each property has a set of legal set of value types. See Properties, below.
pvalue
A pointer to the new value for propertyname. pvalue will be reinterpreted according to the value type provided.
target
The portion of the API that this property is set for. Legal values are:
-
PROP_EX_TARGET_PORT -- pvalue affects an entire speech port object
-
PROP_EX_TARGET_CHANNEL -- pvalue affects one voice channel in the speech port. The channel is specified by index.
-
PROP_EX_TARGET_GRAMMAR -- pvalue affects one grammar set in the speech port. The set is specified by index.
-
PROP_EX_TARGET_CLIENT -- pvalue is global, and affects all ports on the client.
Remarks
You can use this function only after open a port. Calling this function before opening a port will result in failure. To set client scope property, use static function LVSpeechPort::ClientPropertyEx.
Properties
Network Properties:
PROP_EX_SRE_SERVERS
- Description: This property sets which Speech Engine servers are used for processing decodes. The value is a string containing IP addresses and optional ports separated by semicolons. For instance, "127.0.0.1;10.0.0.1:5721" specifies a server at 127.0.0.1 using the default port of 5730, and a server at 10.0.0.1 using the port 5721.
- Scope: Client
- Possible Values: Strings of IP addresses.
- Default Value: 127.0.0.1:5730
PROP_EX_SET_SERVER_PORT
- Description: Sets the port number of the Speech Engine server the client will use.
- Scope: Client
- Possible Values: Port number.
- Default Value: 5730
Pre-Processing Properties:
PROP_EX_TRIM_SILENCE_VALUE
- Description: Sets how aggressively silence is trimmed from the audio during pre-processing. Values range from 0 to 1000; lower values corresponding to more aggressive trimming.
- Scope: Port
- Possible Values: 0 - 1000
- Default Value: 970
Decode Properties:
PROP_EX_DECODE_THREAD_PRIORITY
- Description: Specifies the priority for the decode thread on the server. Higher priority threads will be processed before other applications on the same machine. Adjusting this parameter is useful for troubleshooting load issues on a machine.
- Scope: Port, Client
- Possible Values: PROP_EX_DECODE_THREAD_PRIORITY_LOW, PROP_EX_DECODE_THREAD_PRIORITY_NORMAL and PROP_EX_DECODE_THREAD_PRIORITY_HIGH
- Default Value: PROP_EX_DECODE_THREAD_PRIORITY_NORMAL
PROP_EX_DECODE_OPTIMIZATION
- Description: Sets whether the Engine should prioritize speed or accuracy while performing a decode. By default, it will switch between modes depending on how much load is happening on the server machine; when the server becomes too busy it will begin optimizing speed over accuracy.
- Scope: Port, Client
- Possible Values: PROP_EX_OPTIMIZE_DECODE_AUTO, PROP_EX_MAXIMIZE_DECODE_SPEED, or PROP_EX_MAXIMIZE_DECODE_ACCURACY.
- Default Value: PROP_EX_OPTIMIZE_DECODE_AUTO
PROP_EX_MAX_NBEST_RETURNED
- Description: Specifies the maximum number of n-best results to be returned by the Engine.
- Scope: Port
- Possible Values: Number of n-best results.
- Default Value: 1
PROP_EX_DECODE_TIMEOUT
- Description: In a non-blocking decode, this is the timeout value, in milliseconds, used by LV_SRE_WaitForDecode and LVSpeechPort::WaitForDecode functions. In blocking decode, this is the time to wait until the decode times out and returns an error from LV_SRE_Decode and LVSpeechPort::Decode.
- Scope: Client
- Possible Values: Time in milliseconds.
- Default Value: 20000
PROP_EX_LOAD_GRAMMAR_TIMEOUT
- Description: Specifies how long, in milliseconds, the client should wait for a grammar to load. If the timeout is reached before the grammar is loaded, the LoadGrammar function returns error code -37, LV_LOAD_GRAMMAR_TIMEOUT.
- Scope: Client
- Possible Values: Time in milliseconds.
- Default Value: 20000
Licensing Properties:
PROP_EX_LICENSE_TYPE
- Description: The license type to use when opening a port. The value options are PROP_EX_LICENSE_VOXLITE, PROP_EX_LICENSE_SPEECHPORT. If the value is set to PROP_EX_LICENSE_VOXLITE, the client will get the license from the Lite license pool (these licenses only allow up to 500 vocabulary items per recognition). If the value is set to PROP_EX_LICENSE_SPEECHPORT, the client will get the license from the Full license pool. By default, the client will auto-pick the license; it will use up Full licenses before using Lite licenses.
- Scope: Client
- Possible Values: PROP_EX_LICENSE_VOXLITE, PROP_EX_LICENSE_SPEECHPORT, auto
- Default Value: Auto
Logging Properties:
PROP_EX_SAVE_SOUND_FILES
- Description: Controls whether the Engine response files will be created and saved. These are .callsre files used by the Speech Tuner to review the contents of interactions.
- Scope: Port
- Possible Values: 0 or 1
- Default Value: 0 (off)
Complete Help Topic List | Speech Engine Product Information