Class CallMediaRecognizeChoiceOptions

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

public final class CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions
The Recognize configurations specific for Recognize Choice.
  • Constructor Details

    • CallMediaRecognizeChoiceOptions

      public CallMediaRecognizeChoiceOptions(CommunicationIdentifier targetParticipant, List<RecognitionChoice> choices)
      Initializes a CallMediaRecognizeDtmfOptions object.
      Parameters:
      targetParticipant - Target participant of DTFM tone recognition.
      choices - Maximum number of DTMF tones to be collected.
  • Method Details

    • getChoices

      public List<RecognitionChoice> getChoices()
      Get the list of recognition choices.
      Returns:
      the list of recognition choices.
    • setSpeechLanguage

      public CallMediaRecognizeChoiceOptions setSpeechLanguage(String speechLanguage)
      Set the speech language property.
      Parameters:
      speechLanguage - the interToneTimeout value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions 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 CallMediaRecognizeChoiceOptions setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId)
      Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed.
      Parameters:
      speechRecognitionModelEndpointId - the speechRecognitionModelEndpointId value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setRecognizeInputType

      public CallMediaRecognizeChoiceOptions setRecognizeInputType(RecognizeInputType recognizeInputType)
      Set the recognizeInputType property: Determines the type of the recognition.
      Overrides:
      setRecognizeInputType in class CallMediaRecognizeOptions
      Parameters:
      recognizeInputType - the recognizeInputType value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setPlayPrompt

      public CallMediaRecognizeChoiceOptions setPlayPrompt(PlaySource playPrompt)
      Set the playPrompt property: The source of the audio to be played for recognition.
      Overrides:
      setPlayPrompt in class CallMediaRecognizeOptions
      Parameters:
      playPrompt - the playPrompt value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setInterruptCallMediaOperation

      public CallMediaRecognizeChoiceOptions setInterruptCallMediaOperation(Boolean interruptCallMediaOperation)
      Set the interruptCallMediaOperation property: If set recognize can barge into other existing queued-up/currently-processing requests.
      Overrides:
      setInterruptCallMediaOperation in class CallMediaRecognizeOptions
      Parameters:
      interruptCallMediaOperation - the interruptCallMediaOperation value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setStopCurrentOperations

      public CallMediaRecognizeChoiceOptions setStopCurrentOperations(Boolean stopCurrentOperations)
      Set the stopCurrentOperations property: If set recognize can barge into other existing queued-up/currently-processing requests.
      Overrides:
      setStopCurrentOperations in class CallMediaRecognizeOptions
      Parameters:
      stopCurrentOperations - the stopCurrentOperations value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setOperationContext

      public CallMediaRecognizeChoiceOptions setOperationContext(String operationContext)
      Set the operationContext property: The value to identify context of the operation.
      Overrides:
      setOperationContext in class CallMediaRecognizeOptions
      Parameters:
      operationContext - the operationContext value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setInterruptPrompt

      public CallMediaRecognizeChoiceOptions setInterruptPrompt(Boolean interruptPrompt)
      Set the interruptPrompt property: Determines if we interrupt the prompt and start recognizing.
      Overrides:
      setInterruptPrompt in class CallMediaRecognizeOptions
      Parameters:
      interruptPrompt - the interruptPrompt value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • setInitialSilenceTimeout

      public CallMediaRecognizeChoiceOptions setInitialSilenceTimeout(Duration initialSilenceTimeout)
      Set the initialSilenceTimeout property: Time to wait for first input after prompt (if any).
      Overrides:
      setInitialSilenceTimeout in class CallMediaRecognizeOptions
      Parameters:
      initialSilenceTimeout - the initialSilenceTimeout value to set.
      Returns:
      the CallMediaRecognizeChoiceOptions object itself.
    • toJson

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

      public static CallMediaRecognizeChoiceOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CallMediaRecognizeChoiceOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CallMediaRecognizeChoiceOptions 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 CallMediaRecognizeChoiceOptions.