Class CallMediaRecognizeSpeechOrDtmfOptions

java.lang.Object
com.azure.communication.callautomation.models.CallMediaRecognizeOptions
com.azure.communication.callautomation.models.CallMediaRecognizeSpeechOrDtmfOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<CallMediaRecognizeOptions>

public class CallMediaRecognizeSpeechOrDtmfOptions extends CallMediaRecognizeOptions
The Recognize configurations specific for Continuous Speech or DTMF Recognition.
  • 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

    • 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.
    • 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.
    • getMaxTonesToCollect

      public int getMaxTonesToCollect()
      Get the maxTonesToCollect property: Maximum number of DTMFs to be collected.
      Returns:
      the maxTonesToCollect value.
    • getStopTones

      public List<DtmfTone> getStopTones()
      Get the stopTones property: List of tones that will stop recognizing.
      Returns:
      the stopTones value.
    • 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.
    • 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.
    • setSpeechLanguage

      public CallMediaRecognizeSpeechOrDtmfOptions setSpeechLanguage(String speechLanguage)
      Set the speech language property.
      Parameters:
      speechLanguage - the speechLanguage value to set.
      Returns:
      the CallMediaRecognizeSpeechOrDtmfOptions object itself.
    • 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.
    • 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.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Throws:
      IOException
    • fromJson

      public static CallMediaRecognizeSpeechOrDtmfOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.