Class CreateJobOptions.Builder

java.lang.Object
com.ibm.watson.speech_to_text.v1.model.CreateJobOptions.Builder
Enclosing class:
CreateJobOptions

public static class CreateJobOptions.Builder
extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(InputStream audio)
      Instantiates a new builder with required properties.
      Parameters:
      audio - the audio
  • Method Details

    • build

      public CreateJobOptions build()
      Builds a CreateJobOptions.
      Returns:
      the new CreateJobOptions instance
    • addKeyword

      public CreateJobOptions.Builder addKeyword​(String keyword)
      Adds an keyword to keywords.
      Parameters:
      keyword - the new keyword
      Returns:
      the CreateJobOptions builder
    • audio

      public CreateJobOptions.Builder audio​(InputStream audio)
      Set the audio.
      Parameters:
      audio - the audio
      Returns:
      the CreateJobOptions builder
    • contentType

      public CreateJobOptions.Builder contentType​(String contentType)
      Set the contentType.
      Parameters:
      contentType - the contentType
      Returns:
      the CreateJobOptions builder
    • model

      public CreateJobOptions.Builder model​(String model)
      Set the model.
      Parameters:
      model - the model
      Returns:
      the CreateJobOptions builder
    • callbackUrl

      public CreateJobOptions.Builder callbackUrl​(String callbackUrl)
      Set the callbackUrl.
      Parameters:
      callbackUrl - the callbackUrl
      Returns:
      the CreateJobOptions builder
    • events

      public CreateJobOptions.Builder events​(String events)
      Set the events.
      Parameters:
      events - the events
      Returns:
      the CreateJobOptions builder
    • userToken

      public CreateJobOptions.Builder userToken​(String userToken)
      Set the userToken.
      Parameters:
      userToken - the userToken
      Returns:
      the CreateJobOptions builder
    • resultsTtl

      public CreateJobOptions.Builder resultsTtl​(long resultsTtl)
      Set the resultsTtl.
      Parameters:
      resultsTtl - the resultsTtl
      Returns:
      the CreateJobOptions builder
    • languageCustomizationId

      public CreateJobOptions.Builder languageCustomizationId​(String languageCustomizationId)
      Set the languageCustomizationId.
      Parameters:
      languageCustomizationId - the languageCustomizationId
      Returns:
      the CreateJobOptions builder
    • acousticCustomizationId

      public CreateJobOptions.Builder acousticCustomizationId​(String acousticCustomizationId)
      Set the acousticCustomizationId.
      Parameters:
      acousticCustomizationId - the acousticCustomizationId
      Returns:
      the CreateJobOptions builder
    • baseModelVersion

      public CreateJobOptions.Builder baseModelVersion​(String baseModelVersion)
      Set the baseModelVersion.
      Parameters:
      baseModelVersion - the baseModelVersion
      Returns:
      the CreateJobOptions builder
    • customizationWeight

      public CreateJobOptions.Builder customizationWeight​(Double customizationWeight)
      Set the customizationWeight.
      Parameters:
      customizationWeight - the customizationWeight
      Returns:
      the CreateJobOptions builder
    • inactivityTimeout

      public CreateJobOptions.Builder inactivityTimeout​(long inactivityTimeout)
      Set the inactivityTimeout.
      Parameters:
      inactivityTimeout - the inactivityTimeout
      Returns:
      the CreateJobOptions builder
    • keywords

      public CreateJobOptions.Builder keywords​(List<String> keywords)
      Set the keywords. Existing keywords will be replaced.
      Parameters:
      keywords - the keywords
      Returns:
      the CreateJobOptions builder
    • keywordsThreshold

      public CreateJobOptions.Builder keywordsThreshold​(Float keywordsThreshold)
      Set the keywordsThreshold.
      Parameters:
      keywordsThreshold - the keywordsThreshold
      Returns:
      the CreateJobOptions builder
    • maxAlternatives

      public CreateJobOptions.Builder maxAlternatives​(long maxAlternatives)
      Set the maxAlternatives.
      Parameters:
      maxAlternatives - the maxAlternatives
      Returns:
      the CreateJobOptions builder
    • wordAlternativesThreshold

      public CreateJobOptions.Builder wordAlternativesThreshold​(Float wordAlternativesThreshold)
      Set the wordAlternativesThreshold.
      Parameters:
      wordAlternativesThreshold - the wordAlternativesThreshold
      Returns:
      the CreateJobOptions builder
    • wordConfidence

      public CreateJobOptions.Builder wordConfidence​(Boolean wordConfidence)
      Set the wordConfidence.
      Parameters:
      wordConfidence - the wordConfidence
      Returns:
      the CreateJobOptions builder
    • timestamps

      public CreateJobOptions.Builder timestamps​(Boolean timestamps)
      Set the timestamps.
      Parameters:
      timestamps - the timestamps
      Returns:
      the CreateJobOptions builder
    • profanityFilter

      public CreateJobOptions.Builder profanityFilter​(Boolean profanityFilter)
      Set the profanityFilter.
      Parameters:
      profanityFilter - the profanityFilter
      Returns:
      the CreateJobOptions builder
    • smartFormatting

      public CreateJobOptions.Builder smartFormatting​(Boolean smartFormatting)
      Set the smartFormatting.
      Parameters:
      smartFormatting - the smartFormatting
      Returns:
      the CreateJobOptions builder
    • speakerLabels

      public CreateJobOptions.Builder speakerLabels​(Boolean speakerLabels)
      Set the speakerLabels.
      Parameters:
      speakerLabels - the speakerLabels
      Returns:
      the CreateJobOptions builder
    • customizationId

      public CreateJobOptions.Builder customizationId​(String customizationId)
      Set the customizationId.
      Parameters:
      customizationId - the customizationId
      Returns:
      the CreateJobOptions builder
    • grammarName

      public CreateJobOptions.Builder grammarName​(String grammarName)
      Set the grammarName.
      Parameters:
      grammarName - the grammarName
      Returns:
      the CreateJobOptions builder
    • redaction

      public CreateJobOptions.Builder redaction​(Boolean redaction)
      Set the redaction.
      Parameters:
      redaction - the redaction
      Returns:
      the CreateJobOptions builder
    • processingMetrics

      public CreateJobOptions.Builder processingMetrics​(Boolean processingMetrics)
      Set the processingMetrics.
      Parameters:
      processingMetrics - the processingMetrics
      Returns:
      the CreateJobOptions builder
    • processingMetricsInterval

      public CreateJobOptions.Builder processingMetricsInterval​(Float processingMetricsInterval)
      Set the processingMetricsInterval.
      Parameters:
      processingMetricsInterval - the processingMetricsInterval
      Returns:
      the CreateJobOptions builder
    • audioMetrics

      public CreateJobOptions.Builder audioMetrics​(Boolean audioMetrics)
      Set the audioMetrics.
      Parameters:
      audioMetrics - the audioMetrics
      Returns:
      the CreateJobOptions builder
    • endOfPhraseSilenceTime

      public CreateJobOptions.Builder endOfPhraseSilenceTime​(Double endOfPhraseSilenceTime)
      Set the endOfPhraseSilenceTime.
      Parameters:
      endOfPhraseSilenceTime - the endOfPhraseSilenceTime
      Returns:
      the CreateJobOptions builder
    • splitTranscriptAtPhraseEnd

      public CreateJobOptions.Builder splitTranscriptAtPhraseEnd​(Boolean splitTranscriptAtPhraseEnd)
      Set the splitTranscriptAtPhraseEnd.
      Parameters:
      splitTranscriptAtPhraseEnd - the splitTranscriptAtPhraseEnd
      Returns:
      the CreateJobOptions builder
    • speechDetectorSensitivity

      public CreateJobOptions.Builder speechDetectorSensitivity​(Float speechDetectorSensitivity)
      Set the speechDetectorSensitivity.
      Parameters:
      speechDetectorSensitivity - the speechDetectorSensitivity
      Returns:
      the CreateJobOptions builder
    • backgroundAudioSuppression

      public CreateJobOptions.Builder backgroundAudioSuppression​(Float backgroundAudioSuppression)
      Set the backgroundAudioSuppression.
      Parameters:
      backgroundAudioSuppression - the backgroundAudioSuppression
      Returns:
      the CreateJobOptions builder
    • lowLatency

      public CreateJobOptions.Builder lowLatency​(Boolean lowLatency)
      Set the lowLatency.
      Parameters:
      lowLatency - the lowLatency
      Returns:
      the CreateJobOptions builder
    • audio

      public CreateJobOptions.Builder audio​(File audio) throws FileNotFoundException
      Set the audio.
      Parameters:
      audio - the audio
      Returns:
      the CreateJobOptions builder
      Throws:
      FileNotFoundException - if the file could not be found