Rate this page:

ASRParameters

ASR parameters Add the following line to your scenario code to use the interface:

require(Modules.ASR);

Props

alternativeLanguageCodes

Beta
Copy URL
alternativeLanguageCodes: 

string[]

v1p1beta1 Speech API feature. A list of up to 3 additional BCP-47 language tags, listing possible alternative languages of the supplied audio. See Language Support for a list of the currently supported language codes.

Requires the beta parameter set to true; works for Google profiles only.

beta

Beta
Copy URL
beta: 

boolean

Use or not the Google v1p1beta1 Speech API, e.g., enableSeparateRecognitionPerChannel, alternativeLanguageCodes, enableWordTimeOffsets, etc.

diarizationConfig

Beta
Copy URL
diarizationConfig: 

{enableSpeakerDiarization: boolean}

v1p1beta1 Speech API feature. Config to enable speaker diarization and set additional parameters to make diarization better suited for your application.

Requires the beta parameter set to true; works for Google profiles only.

enableAutomaticPunctuation

Beta
Copy URL
enableAutomaticPunctuation: 

boolean

v1p1beta1 Speech API feature. If true, adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default false value does not add punctuation to result hypotheses.

Requires the beta parameter set to true; works for Google profiles only.

enableSeparateRecognitionPerChannel

Beta
Copy URL
enableSeparateRecognitionPerChannel: 

boolean

v1p1beta1 Speech API feature. The recognition result will contain a field to state which channel that result belongs to. If this is not true, only the first channel will be recognized.

Requires the beta parameter set to true; works for Google profiles only.

enableWordConfidence

Beta
Copy URL
enableWordConfidence: 

boolean

v1p1beta1 Speech API feature. If true, the top result includes a list of words and the confidence for those words. If false, no word-level confidence information is returned. The default is false.

Requires the beta parameter set to true; works for Google profiles only.

enableWordTimeOffsets

Beta
Copy URL
enableWordTimeOffsets: 

boolean

v1p1beta1 Speech API feature. If true, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If false, no word-level time offset information is returned. The default is false.

Requires the beta parameter set to true; works for Google profiles only.

interimResults

Optional
Copy URL
interimResults: 

boolean

Enables/disables interim ASR results. If it is "true", the ASREvents.InterimResult will be triggered many times according to the speech.

metadata

Beta
Copy URL
metadata: 

{microphoneDistance: string}

v1p1beta1 Speech API feature. Metadata regarding this request.

Requires the beta parameter set to true; works for Google profiles only.

model

Optional
Copy URL
model: 

ASRModelList

Recognition model. Select the model best suited to your domain to get the best results. If it's not specified, the DEFAULT model is used. IMPORTANT: if you use Google Speech-to-Text profiles and do not specify model, VoxEngine does not use the DEFAULT model. Instead, we let Google decide which model to use.

phraseHints

Optional
Copy URL
phraseHints: 

string[]

Preferable words to recognize. Supported by the Google profile only. Note that phraseHints do not limit the recognition to the specific list. Instead, words in the specified list will have a higher chance to be selected.

profanityFilter

Optional
Copy URL
profanityFilter: 

boolean

If set to true, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. "f***". If set to false or omitted, profanities won't be filtered out.

profile

Copy URL
profile: 

ASRProfileList

Profile that specifies an ASR provider and a language to use.

singleUtterance

Optional
Copy URL
singleUtterance: 

boolean

Enables/disables single utterance. It is true by default, so the ASREvents.Result will be triggered after every utterance. If it is false, there are two cases: 1) if the speech is shorter than 60 sec, ASREvents.Result will be triggered in unpredictable time. You could mute the mic when the speech is over - this will increase the probability of ASREvents.Result catching 2) if the speech is longer than 60 sec, ASREvents.Result will be triggered each 60 seconds

speechContexts

Beta
Optional
Copy URL
speechContexts: 

{boost: number, phrases: string[]}

Increase the recognition model bias by assigning more weight to some phrases than others. Phrases is the word array, boost is the weight in the range of 1..20.