Class TranscriptionSettings.Builder

java.lang.Object
com.vonage.client.voice.ncco.TranscriptionSettings.Builder
Enclosing class:
TranscriptionSettings

public static final class TranscriptionSettings.Builder extends Object
Builder for setting the TranscriptionSettings parameters. All settings / fields are optional.
  • Method Details

    • language

      The language (BCP-47 format) for the recording you're transcribing. This currently supports the same languages as Automatic Speech Recording.
      Parameters:
      language - The recording language as an enum.
      Returns:
      This builder.
    • eventUrl

      The URL to the webhook endpoint that is called asynchronously when a transcription is finished.
      Parameters:
      eventUrl - The event URL as a string.
      Returns:
      This builder.
    • eventMethod

      The HTTP method Vonage uses to make the request to eventUrl. The default value is EventMethod.POST.
      Parameters:
      eventMethod - The HTTP method as an enum.
      Returns:
      This builder.
    • sentimentAnalysis

      public TranscriptionSettings.Builder sentimentAnalysis(boolean sentimentAnalysis)
      Whether to perform sentiment analysis on the call recording transcription segments. Will return a value between -1 (negative sentiment) and 1 (positive sentiment) for each segment. Defaults to false.
      Parameters:
      sentimentAnalysis - true to enable sentiment analysis on the recording.
      Returns:
      This builder.
    • build

      Builds the TranscriptionSettings object.
      Returns:
      A new TranscriptionSettings instance with this builder's settings.