Voice.setProperties()

Overview

Changes voice properties for Speakeasy.

Added in version 2.0.1

Use Case

Change the settings for how the engine detects speech.

Format

var propertyList = {name:value, name2:value2};

Voice.setProperties(propertyList);

Parameter Description Type Required
propertyList Object that contains 1 or more property names and values. Object Required
name The name of the property to set. String Required
value The value to assign to the property. Integer Required

Voice Properties

Name Default value Range Description
audioSource 1 1 or 6 1 = Mic
6 = Voice recognition
beginEnergy -2500
(-25 dB)
-5400 to 1800
(-54 dB to 18 dB)
This is the amount of energy that the microphone input data must have before the beginning of speech detection will decide that the user might be talking. It is also called the absolute threshold.
beginSensitivity 50 0 to 100 This setting affects the sensitivity of the beginning of speech detection, if "detectStart" is enabled. The higher this value, the easier beginning-of-speech will be detected.
detectStart 1 0 to 1 If this setting is 1, then the speech-to-text engine will use the beginEnergy value to determine when the user is speaking. If set to 0, then the engine will assume the user is always talking. You should leave this setting enabled unless you have specific issues that can only be solved by disabling it.
eventTimer 1000 (ms) 0 to 60000 A timer event will be generated after the specified amount of input signal is processed.
farMicrophone 0 0 to 1 This should be set to 0 if the user has a headset microphone close to their mouth, and 1 if they are using a microphone that is further away.
fastSpeakerAdaptation 0 0 to 1 Influences how much past information is used to estimate the current speaker and environment settings. 1 means a short history is used. A value of 0 means a long history is used.
maxBestResult 4 1 to 50 Maximum number of hypotheses returned in a result.
maxBestSecondPass 10 1 to 50 Controls the maximum number of hypotheses that will be considered during the second pass of a search algorithm.
micGain 100 0 to 200 Sets software gain by percentage.
minConfidence 5000 1 to 10000 The minimum confidence level that will be accepted for a speech-to-text result. Results with a confidence value less than the threshold value are ignored. If you are having too many of your speech-to-text results discarded, you can lower this value. If you are getting too many incorrect results, you should increase this value.
minSpeech 60 (ms) 0 to 400 The minimal duration, in milliseconds, of the speech before the beginning of speech detection actually detects beginning of speech.
searchAccuracy 200 0 to 1000 This value affects the trade-off between CPU-load, memory requirements and the obtained accuracy of the search. With a lower value, less CPU-time and memory are needed, but the accuracy also degrades. With a higher value, more CPU-time and memory are needed, but the accuracy increases.
timeoutSpeech 3000 0 to 300000 This is the maximum amount of time, in milliseconds, that the speech-to-text engine will perform speech recognition before it returns an empty result.
trailingSilence 300 0 to 2000 This is the amount of silence, in milliseconds, that the speech-to-text engine expects to hear to know that the user has finished talking. You can make this value shorter when using very short phrases in a grammar, and longer when using long phrases.

Example 1

Copy
/* Change the minimum confidence level to 4000.
*/
Voice.setProperties({minConfidence: 4000});