Class CalloutRequestParametersTTS.Builder

Enclosing class:
CalloutRequestParametersTTS

public static class CalloutRequestParametersTTS.Builder extends CalloutRequestParameters.Builder<CalloutRequestParametersTTS.Builder>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setEnableAce

      public CalloutRequestParametersTTS.Builder setEnableAce(Boolean enableAce)
      If enableAce is set to true and the application has a callback URL specified, you will receive an ACE callback when the call is answered. When the callback is received, your platform must respond with a svamlet containing the connectConf action in order to add the call to a conference or create the conference if it's the first call. If it's set to false, no ACE event will be sent to your backend. Note if the call is towards an InApp destination type: username, then no ACE will be issued when the call is connected, even if enableAce is present in the callout request.
      Parameters:
      enableAce - set if enabled or not
      Returns:
      current builder
    • setEnableDice

      public CalloutRequestParametersTTS.Builder setEnableDice(Boolean enableDice)
      If enableDice is set to true and the application has a callback URL specified, you will receive a DiCE callback when the call is disconnected. If it's set to false, no DiCE event will be sent to your backend. Note if the call is towards an InApp destination type: username, then no DICE will be issued at the end of the call, even if enableDice is present in the callout request.
      Parameters:
      enableDice - set if enabled or not
      Returns:
      current builder
    • setEnablePie

      public CalloutRequestParametersTTS.Builder setEnablePie(Boolean enablePie)
      If enablePie is set to true and the application has a callback URL specified, you will receive a PIE callback after a runMenu action, with the information of the action that the user took. If it's set to false, no PIE event will be sent to your backend.
      Parameters:
      enablePie - set if enabled or not
      Returns:
      current builder
    • setLocale

      public CalloutRequestParametersTTS.Builder setLocale(String locale)
      The voice and language you want to use for the prompts. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice.
      Parameters:
      locale - The locale to be used
      Returns:
      current builder
      See Also:
    • setDomain

      Parameters:
      domain - Domain value to be used
      Returns:
      current builder
    • setText

      Every application's default maximum characters allowed in text-to-speech is 600 characters. Contact support if you wish this limit to be changed.
      Parameters:
      text - The text that will be spoken in the text-to-speech message
      Returns:
      current builder
    • setPrompts

      public CalloutRequestParametersTTS.Builder setPrompts(String prompts)
      An advanced alternative to using text.
      TTS Text To Speech
      The equivalent of text but within the prompt property.

      Example: #tts[Hello from Sinch]

      TTS with SSML Text To Speech with Speech Synthesis Markup Language (SSML)
      This is an XML-based markup language for assisting the generation of synthetic speech in the Web and other applications. AWS Polly supports a sub-set of SSML. This allows us to use SSML-enhanced text for additional control over how Polly generates speech from the text. Details and examples of supported tags @link are here
      Externally hosted media
      Provide a URL to your own hosted media. Please check @link here to read about audio content type and usage limits.

      Every application's default maximum allowed in TTS or TTS SSML is 600 characters. Contact support if you wish this limit to be changed. Several prompts can be used, separated by a semi-colon ;

      Example: #tts[Hello from Sinch];#ssml[<speak><break time="250ms"/>Have a great day!</speak>]

      Parameters:
      prompts - The text to be used
      Returns:
      current builder
    • build