public static class RecognizeWithWebsocketsOptions.Builder extends Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(InputStream audio)
Instantiates a new builder with required properties.
|
public Builder()
public Builder(InputStream audio)
audio
- the audiopublic RecognizeWithWebsocketsOptions build()
public RecognizeWithWebsocketsOptions.Builder addKeyword(String keyword)
keyword
- the new keywordpublic RecognizeWithWebsocketsOptions.Builder audio(InputStream audio)
audio
- the audiopublic RecognizeWithWebsocketsOptions.Builder contentType(String contentType)
contentType
- the contentTypepublic RecognizeWithWebsocketsOptions.Builder model(String model)
model
- the modelpublic RecognizeWithWebsocketsOptions.Builder languageCustomizationId(String languageCustomizationId)
languageCustomizationId
- the languageCustomizationIdpublic RecognizeWithWebsocketsOptions.Builder acousticCustomizationId(String acousticCustomizationId)
acousticCustomizationId
- the acousticCustomizationIdpublic RecognizeWithWebsocketsOptions.Builder baseModelVersion(String baseModelVersion)
baseModelVersion
- the baseModelVersionpublic RecognizeWithWebsocketsOptions.Builder customizationWeight(Double customizationWeight)
customizationWeight
- the customizationWeightpublic RecognizeWithWebsocketsOptions.Builder inactivityTimeout(long inactivityTimeout)
inactivityTimeout
- the inactivityTimeoutpublic RecognizeWithWebsocketsOptions.Builder keywords(List<String> keywords)
keywords
- the keywordspublic RecognizeWithWebsocketsOptions.Builder keywordsThreshold(Float keywordsThreshold)
keywordsThreshold
- the keywordsThresholdpublic RecognizeWithWebsocketsOptions.Builder maxAlternatives(long maxAlternatives)
maxAlternatives
- the maxAlternativespublic RecognizeWithWebsocketsOptions.Builder wordAlternativesThreshold(Float wordAlternativesThreshold)
wordAlternativesThreshold
- the wordAlternativesThresholdpublic RecognizeWithWebsocketsOptions.Builder wordConfidence(Boolean wordConfidence)
wordConfidence
- the wordConfidencepublic RecognizeWithWebsocketsOptions.Builder timestamps(Boolean timestamps)
timestamps
- the timestampspublic RecognizeWithWebsocketsOptions.Builder profanityFilter(Boolean profanityFilter)
profanityFilter
- the profanityFilterpublic RecognizeWithWebsocketsOptions.Builder smartFormatting(Boolean smartFormatting)
smartFormatting
- the smartFormattingpublic RecognizeWithWebsocketsOptions.Builder smartFormattingVersion(long smartFormattingVersion)
smartFormattingVersion
- the smartFormattingVersionpublic RecognizeWithWebsocketsOptions.Builder speakerLabels(Boolean speakerLabels)
speakerLabels
- the speakerLabelspublic RecognizeWithWebsocketsOptions.Builder grammarName(String grammarName)
grammarName
- the grammarNamepublic RecognizeWithWebsocketsOptions.Builder redaction(Boolean redaction)
redaction
- the redactionpublic RecognizeWithWebsocketsOptions.Builder audioMetrics(Boolean audioMetrics)
audioMetrics
- the audioMetricspublic RecognizeWithWebsocketsOptions.Builder endOfPhraseSilenceTime(Double endOfPhraseSilenceTime)
endOfPhraseSilenceTime
- the endOfPhraseSilenceTimepublic RecognizeWithWebsocketsOptions.Builder splitTranscriptAtPhraseEnd(Boolean splitTranscriptAtPhraseEnd)
splitTranscriptAtPhraseEnd
- the splitTranscriptAtPhraseEndpublic RecognizeWithWebsocketsOptions.Builder speechDetectorSensitivity(Float speechDetectorSensitivity)
speechDetectorSensitivity
- the speechDetectorSensitivitypublic RecognizeWithWebsocketsOptions.Builder backgroundAudioSuppression(Float backgroundAudioSuppression)
backgroundAudioSuppression
- the backgroundAudioSuppressionpublic RecognizeWithWebsocketsOptions.Builder characterInsertionBias(Float characterInsertionBias)
characterInsertionBias
- the characterInsertionBiaspublic RecognizeWithWebsocketsOptions.Builder audio(File audio) throws FileNotFoundException
audio
- the audioFileNotFoundException
- if the file could not be foundpublic RecognizeWithWebsocketsOptions.Builder processingMetrics(Boolean processingMetrics)
NOTE: This parameter only works for the `recognizeUsingWebSocket` method.
processingMetrics
- the processingMetricspublic RecognizeWithWebsocketsOptions.Builder processingMetricsInterval(Float processingMetricsInterval)
NOTE: This parameter only works for the `recognizeUsingWebSocket` method.
processingMetricsInterval
- the processingMetricsIntervalCopyright © 2024 IBM Cloud. All rights reserved.