CallMediaRecognizeSpeechOrDtmfOptions Class

public class CallMediaRecognizeSpeechOrDtmfOptions
extends CallMediaRecognizeOptions

The Recognize configurations specific for Continuous Speech or DTMF Recognition.

Constructor Summary

Constructor Description
CallMediaRecognizeSpeechOrDtmfOptions(CommunicationIdentifier targetParticipant, int maxTonesToCollect, Duration endSilenceTimeout)

Initializes a CallMediaRecognizeSpeechOrDtmfOptions object.

Method Summary

Modifier and Type Method and Description
static CallMediaRecognizeSpeechOrDtmfOptions fromJson(JsonReader jsonReader)

Reads an instance of CallMediaRecognizeSpeechOrDtmfOptions from the JsonReader.

Duration getEndSilenceTimeout()

Get the endSilenceTimeout property: The length of end silence when user stops speaking and cogservice send response.

Duration getInterToneTimeout()

Get the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

int getMaxTonesToCollect()

Get the maxTonesToCollect property: Maximum number of DTMFs to be collected.

String getSpeechLanguage()

Get the speech language property.

String getSpeechRecognitionModelEndpointId()

Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed.

List<DtmfTone> getStopTones()

Get the stopTones property: List of tones that will stop recognizing.

CallMediaRecognizeSpeechOrDtmfOptions setInterToneTimeout(Duration interToneTimeout)

Set the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

CallMediaRecognizeSpeechOrDtmfOptions setSpeechLanguage(String speechLanguage)

Set the speech language property.

CallMediaRecognizeSpeechOrDtmfOptions setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId)

Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed.

CallMediaRecognizeSpeechOrDtmfOptions setStopTones(List<DtmfTone> stopDtmfTones)

Set the stopTones property: List of tones that will stop recognizing.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from CallMediaRecognizeOptions

Methods inherited from java.lang.Object

Constructor Details

CallMediaRecognizeSpeechOrDtmfOptions

public CallMediaRecognizeSpeechOrDtmfOptions(CommunicationIdentifier targetParticipant, int maxTonesToCollect, Duration endSilenceTimeout)

Initializes a CallMediaRecognizeSpeechOrDtmfOptions object.

Parameters:

targetParticipant - Target participant of continuous speech recognition.
maxTonesToCollect - Maximum number of DTMF tones to be collected.
endSilenceTimeout - the endSilenceTimeout value to set.

Method Details

fromJson

public static CallMediaRecognizeSpeechOrDtmfOptions fromJson(JsonReader jsonReader)

Reads an instance of CallMediaRecognizeSpeechOrDtmfOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CallMediaRecognizeSpeechOrDtmfOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the CallMediaRecognizeSpeechOrDtmfOptions.

getEndSilenceTimeout

public Duration getEndSilenceTimeout()

Get the endSilenceTimeout property: The length of end silence when user stops speaking and cogservice send response.

Returns:

the endSilenceTimeout value.

getInterToneTimeout

public Duration getInterToneTimeout()

Get the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing. If left unspecified, the default value is set to 2 seconds.

Returns:

the interToneTimeout value.

getMaxTonesToCollect

public int getMaxTonesToCollect()

Get the maxTonesToCollect property: Maximum number of DTMFs to be collected.

Returns:

the maxTonesToCollect value.

getSpeechLanguage

public String getSpeechLanguage()

Get the speech language property.

Returns:

the speech language.

getSpeechRecognitionModelEndpointId

public String getSpeechRecognitionModelEndpointId()

Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed.

Returns:

the speechRecognitionModelEndpointId value.

getStopTones

public List<DtmfTone> getStopTones()

Get the stopTones property: List of tones that will stop recognizing.

Returns:

the stopTones value.

setInterToneTimeout

public CallMediaRecognizeSpeechOrDtmfOptions setInterToneTimeout(Duration interToneTimeout)

Set the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

Parameters:

interToneTimeout - the interToneTimeout value to set.

Returns:

the DtmfConfigurationsInternal object itself.

setSpeechLanguage

public CallMediaRecognizeSpeechOrDtmfOptions setSpeechLanguage(String speechLanguage)

Set the speech language property.

Parameters:

speechLanguage - the speechLanguage value to set.

Returns:

the CallMediaRecognizeSpeechOrDtmfOptions object itself.

setSpeechRecognitionModelEndpointId

public CallMediaRecognizeSpeechOrDtmfOptions setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId)

Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed.

Parameters:

speechRecognitionModelEndpointId - the speechRecognitionModelEndpointId value to set.

Returns:

the CallMediaRecognizeSpeechOrDtmfOptions object itself.

setStopTones

public CallMediaRecognizeSpeechOrDtmfOptions setStopTones(List<DtmfTone> stopDtmfTones)

Set the stopTones property: List of tones that will stop recognizing.

Parameters:

stopDtmfTones - the stopTones value to set.

Returns:

the DtmfConfigurationsInternal object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to