Class RecognizeOptions.Builder
java.lang.Object
com.ibm.watson.speech_to_text.v1.model.RecognizeOptions.Builder
- Enclosing class:
- RecognizeOptions
public static class RecognizeOptions.Builder extends Object
Builder.
- 
Constructor SummaryConstructors Constructor Description Builder()Instantiates a new builder.Builder(InputStream audio)Instantiates a new builder with required properties.
- 
Method SummaryModifier and Type Method Description RecognizeOptions.BuilderacousticCustomizationId(String acousticCustomizationId)Set the acousticCustomizationId.RecognizeOptions.BuilderaddKeyword(String keyword)Adds an keyword to keywords.RecognizeOptions.Builderaudio(File audio)Set the audio.RecognizeOptions.Builderaudio(InputStream audio)Set the audio.RecognizeOptions.BuilderaudioMetrics(Boolean audioMetrics)Set the audioMetrics.RecognizeOptions.BuilderbackgroundAudioSuppression(Float backgroundAudioSuppression)Set the backgroundAudioSuppression.RecognizeOptions.BuilderbaseModelVersion(String baseModelVersion)Set the baseModelVersion.RecognizeOptionsbuild()Builds a RecognizeOptions.RecognizeOptions.BuildercontentType(String contentType)Set the contentType.RecognizeOptions.BuildercustomizationId(String customizationId)Set the customizationId.RecognizeOptions.BuildercustomizationWeight(Double customizationWeight)Set the customizationWeight.RecognizeOptions.BuilderendOfPhraseSilenceTime(Double endOfPhraseSilenceTime)Set the endOfPhraseSilenceTime.RecognizeOptions.BuildergrammarName(String grammarName)Set the grammarName.RecognizeOptions.BuilderinactivityTimeout(long inactivityTimeout)Set the inactivityTimeout.RecognizeOptions.Builderkeywords(List<String> keywords)Set the keywords.RecognizeOptions.BuilderkeywordsThreshold(Float keywordsThreshold)Set the keywordsThreshold.RecognizeOptions.BuilderlanguageCustomizationId(String languageCustomizationId)Set the languageCustomizationId.RecognizeOptions.BuilderlowLatency(Boolean lowLatency)Set the lowLatency.RecognizeOptions.BuildermaxAlternatives(long maxAlternatives)Set the maxAlternatives.RecognizeOptions.Buildermodel(String model)Set the model.RecognizeOptions.BuilderprofanityFilter(Boolean profanityFilter)Set the profanityFilter.RecognizeOptions.Builderredaction(Boolean redaction)Set the redaction.RecognizeOptions.BuildersmartFormatting(Boolean smartFormatting)Set the smartFormatting.RecognizeOptions.BuilderspeakerLabels(Boolean speakerLabels)Set the speakerLabels.RecognizeOptions.BuilderspeechDetectorSensitivity(Float speechDetectorSensitivity)Set the speechDetectorSensitivity.RecognizeOptions.BuildersplitTranscriptAtPhraseEnd(Boolean splitTranscriptAtPhraseEnd)Set the splitTranscriptAtPhraseEnd.RecognizeOptions.Buildertimestamps(Boolean timestamps)Set the timestamps.RecognizeOptions.BuilderwordAlternativesThreshold(Float wordAlternativesThreshold)Set the wordAlternativesThreshold.RecognizeOptions.BuilderwordConfidence(Boolean wordConfidence)Set the wordConfidence.
- 
Constructor Details- 
Builderpublic Builder()Instantiates a new builder.
- 
BuilderInstantiates a new builder with required properties.- Parameters:
- audio- the audio
 
 
- 
- 
Method Details- 
buildBuilds a RecognizeOptions.- Returns:
- the new RecognizeOptions instance
 
- 
addKeywordAdds an keyword to keywords.- Parameters:
- keyword- the new keyword
- Returns:
- the RecognizeOptions builder
 
- 
audioSet the audio.- Parameters:
- audio- the audio
- Returns:
- the RecognizeOptions builder
 
- 
contentTypeSet the contentType.- Parameters:
- contentType- the contentType
- Returns:
- the RecognizeOptions builder
 
- 
modelSet the model.- Parameters:
- model- the model
- Returns:
- the RecognizeOptions builder
 
- 
languageCustomizationIdSet the languageCustomizationId.- Parameters:
- languageCustomizationId- the languageCustomizationId
- Returns:
- the RecognizeOptions builder
 
- 
acousticCustomizationIdSet the acousticCustomizationId.- Parameters:
- acousticCustomizationId- the acousticCustomizationId
- Returns:
- the RecognizeOptions builder
 
- 
baseModelVersionSet the baseModelVersion.- Parameters:
- baseModelVersion- the baseModelVersion
- Returns:
- the RecognizeOptions builder
 
- 
customizationWeightSet the customizationWeight.- Parameters:
- customizationWeight- the customizationWeight
- Returns:
- the RecognizeOptions builder
 
- 
inactivityTimeoutSet the inactivityTimeout.- Parameters:
- inactivityTimeout- the inactivityTimeout
- Returns:
- the RecognizeOptions builder
 
- 
keywordsSet the keywords. Existing keywords will be replaced.- Parameters:
- keywords- the keywords
- Returns:
- the RecognizeOptions builder
 
- 
keywordsThresholdSet the keywordsThreshold.- Parameters:
- keywordsThreshold- the keywordsThreshold
- Returns:
- the RecognizeOptions builder
 
- 
maxAlternativesSet the maxAlternatives.- Parameters:
- maxAlternatives- the maxAlternatives
- Returns:
- the RecognizeOptions builder
 
- 
wordAlternativesThresholdSet the wordAlternativesThreshold.- Parameters:
- wordAlternativesThreshold- the wordAlternativesThreshold
- Returns:
- the RecognizeOptions builder
 
- 
wordConfidenceSet the wordConfidence.- Parameters:
- wordConfidence- the wordConfidence
- Returns:
- the RecognizeOptions builder
 
- 
timestampsSet the timestamps.- Parameters:
- timestamps- the timestamps
- Returns:
- the RecognizeOptions builder
 
- 
profanityFilterSet the profanityFilter.- Parameters:
- profanityFilter- the profanityFilter
- Returns:
- the RecognizeOptions builder
 
- 
smartFormattingSet the smartFormatting.- Parameters:
- smartFormatting- the smartFormatting
- Returns:
- the RecognizeOptions builder
 
- 
speakerLabelsSet the speakerLabels.- Parameters:
- speakerLabels- the speakerLabels
- Returns:
- the RecognizeOptions builder
 
- 
customizationIdSet the customizationId.- Parameters:
- customizationId- the customizationId
- Returns:
- the RecognizeOptions builder
 
- 
grammarNameSet the grammarName.- Parameters:
- grammarName- the grammarName
- Returns:
- the RecognizeOptions builder
 
- 
redactionSet the redaction.- Parameters:
- redaction- the redaction
- Returns:
- the RecognizeOptions builder
 
- 
audioMetricsSet the audioMetrics.- Parameters:
- audioMetrics- the audioMetrics
- Returns:
- the RecognizeOptions builder
 
- 
endOfPhraseSilenceTimeSet the endOfPhraseSilenceTime.- Parameters:
- endOfPhraseSilenceTime- the endOfPhraseSilenceTime
- Returns:
- the RecognizeOptions builder
 
- 
splitTranscriptAtPhraseEndSet the splitTranscriptAtPhraseEnd.- Parameters:
- splitTranscriptAtPhraseEnd- the splitTranscriptAtPhraseEnd
- Returns:
- the RecognizeOptions builder
 
- 
speechDetectorSensitivitySet the speechDetectorSensitivity.- Parameters:
- speechDetectorSensitivity- the speechDetectorSensitivity
- Returns:
- the RecognizeOptions builder
 
- 
backgroundAudioSuppressionSet the backgroundAudioSuppression.- Parameters:
- backgroundAudioSuppression- the backgroundAudioSuppression
- Returns:
- the RecognizeOptions builder
 
- 
lowLatencySet the lowLatency.- Parameters:
- lowLatency- the lowLatency
- Returns:
- the RecognizeOptions builder
 
- 
audioSet the audio.- Parameters:
- audio- the audio
- Returns:
- the RecognizeOptions builder
- Throws:
- FileNotFoundException- if the file could not be found
 
 
-