Class CallMediaRecognizeSpeechOptions

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

public class CallMediaRecognizeSpeechOptions extends CallMediaRecognizeOptions
The Recognize configurations specific for Continuous Speech Recognition.
  • Constructor Details

    • CallMediaRecognizeSpeechOptions

      public CallMediaRecognizeSpeechOptions(CommunicationIdentifier targetParticipant, Duration endSilenceTimeout)
      Initializes a CallMediaRecognizeSpeechOptions object.
      Parameters:
      targetParticipant - Target participant of continuous speech recognition.
      endSilenceTimeout - the endSilenceTimeout value to set.
  • Method Details

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

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setPlayPrompt

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setInterruptCallMediaOperation

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setStopCurrentOperations

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setOperationContext

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setInterruptPrompt

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setInitialSilenceTimeout

      public CallMediaRecognizeSpeechOptions 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 CallMediaRecognizeSpeechOptions object itself.
    • setSpeechLanguage

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

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

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