public static class RecognizeOptions.Builder extends Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(InputStream audio)
Instantiates a new builder with required properties.
|
Modifier and Type | Method and Description |
---|---|
RecognizeOptions.Builder |
acousticCustomizationId(String acousticCustomizationId)
Set the acousticCustomizationId.
|
RecognizeOptions.Builder |
addKeyword(String keyword)
Adds an keyword to keywords.
|
RecognizeOptions.Builder |
audio(File audio)
Set the audio.
|
RecognizeOptions.Builder |
audio(InputStream audio)
Set the audio.
|
RecognizeOptions.Builder |
audioMetrics(Boolean audioMetrics)
Set the audioMetrics.
|
RecognizeOptions.Builder |
backgroundAudioSuppression(Float backgroundAudioSuppression)
Set the backgroundAudioSuppression.
|
RecognizeOptions.Builder |
baseModelVersion(String baseModelVersion)
Set the baseModelVersion.
|
RecognizeOptions |
build()
Builds a RecognizeOptions.
|
RecognizeOptions.Builder |
contentType(String contentType)
Set the contentType.
|
RecognizeOptions.Builder |
customizationId(String customizationId)
Set the customizationId.
|
RecognizeOptions.Builder |
customizationWeight(Double customizationWeight)
Set the customizationWeight.
|
RecognizeOptions.Builder |
endOfPhraseSilenceTime(Double endOfPhraseSilenceTime)
Set the endOfPhraseSilenceTime.
|
RecognizeOptions.Builder |
grammarName(String grammarName)
Set the grammarName.
|
RecognizeOptions.Builder |
inactivityTimeout(long inactivityTimeout)
Set the inactivityTimeout.
|
RecognizeOptions.Builder |
keywords(List<String> keywords)
Set the keywords.
|
RecognizeOptions.Builder |
keywordsThreshold(Float keywordsThreshold)
Set the keywordsThreshold.
|
RecognizeOptions.Builder |
languageCustomizationId(String languageCustomizationId)
Set the languageCustomizationId.
|
RecognizeOptions.Builder |
lowLatency(Boolean lowLatency)
Set the lowLatency.
|
RecognizeOptions.Builder |
maxAlternatives(long maxAlternatives)
Set the maxAlternatives.
|
RecognizeOptions.Builder |
model(String model)
Set the model.
|
RecognizeOptions.Builder |
profanityFilter(Boolean profanityFilter)
Set the profanityFilter.
|
RecognizeOptions.Builder |
redaction(Boolean redaction)
Set the redaction.
|
RecognizeOptions.Builder |
smartFormatting(Boolean smartFormatting)
Set the smartFormatting.
|
RecognizeOptions.Builder |
speakerLabels(Boolean speakerLabels)
Set the speakerLabels.
|
RecognizeOptions.Builder |
speechDetectorSensitivity(Float speechDetectorSensitivity)
Set the speechDetectorSensitivity.
|
RecognizeOptions.Builder |
splitTranscriptAtPhraseEnd(Boolean splitTranscriptAtPhraseEnd)
Set the splitTranscriptAtPhraseEnd.
|
RecognizeOptions.Builder |
timestamps(Boolean timestamps)
Set the timestamps.
|
RecognizeOptions.Builder |
wordAlternativesThreshold(Float wordAlternativesThreshold)
Set the wordAlternativesThreshold.
|
RecognizeOptions.Builder |
wordConfidence(Boolean wordConfidence)
Set the wordConfidence.
|
public Builder()
public Builder(InputStream audio)
audio
- the audiopublic RecognizeOptions build()
public RecognizeOptions.Builder addKeyword(String keyword)
keyword
- the new keywordpublic RecognizeOptions.Builder audio(InputStream audio)
audio
- the audiopublic RecognizeOptions.Builder contentType(String contentType)
contentType
- the contentTypepublic RecognizeOptions.Builder model(String model)
model
- the modelpublic RecognizeOptions.Builder languageCustomizationId(String languageCustomizationId)
languageCustomizationId
- the languageCustomizationIdpublic RecognizeOptions.Builder acousticCustomizationId(String acousticCustomizationId)
acousticCustomizationId
- the acousticCustomizationIdpublic RecognizeOptions.Builder baseModelVersion(String baseModelVersion)
baseModelVersion
- the baseModelVersionpublic RecognizeOptions.Builder customizationWeight(Double customizationWeight)
customizationWeight
- the customizationWeightpublic RecognizeOptions.Builder inactivityTimeout(long inactivityTimeout)
inactivityTimeout
- the inactivityTimeoutpublic RecognizeOptions.Builder keywords(List<String> keywords)
keywords
- the keywordspublic RecognizeOptions.Builder keywordsThreshold(Float keywordsThreshold)
keywordsThreshold
- the keywordsThresholdpublic RecognizeOptions.Builder maxAlternatives(long maxAlternatives)
maxAlternatives
- the maxAlternativespublic RecognizeOptions.Builder wordAlternativesThreshold(Float wordAlternativesThreshold)
wordAlternativesThreshold
- the wordAlternativesThresholdpublic RecognizeOptions.Builder wordConfidence(Boolean wordConfidence)
wordConfidence
- the wordConfidencepublic RecognizeOptions.Builder timestamps(Boolean timestamps)
timestamps
- the timestampspublic RecognizeOptions.Builder profanityFilter(Boolean profanityFilter)
profanityFilter
- the profanityFilterpublic RecognizeOptions.Builder smartFormatting(Boolean smartFormatting)
smartFormatting
- the smartFormattingpublic RecognizeOptions.Builder speakerLabels(Boolean speakerLabels)
speakerLabels
- the speakerLabelspublic RecognizeOptions.Builder customizationId(String customizationId)
customizationId
- the customizationIdpublic RecognizeOptions.Builder grammarName(String grammarName)
grammarName
- the grammarNamepublic RecognizeOptions.Builder redaction(Boolean redaction)
redaction
- the redactionpublic RecognizeOptions.Builder audioMetrics(Boolean audioMetrics)
audioMetrics
- the audioMetricspublic RecognizeOptions.Builder endOfPhraseSilenceTime(Double endOfPhraseSilenceTime)
endOfPhraseSilenceTime
- the endOfPhraseSilenceTimepublic RecognizeOptions.Builder splitTranscriptAtPhraseEnd(Boolean splitTranscriptAtPhraseEnd)
splitTranscriptAtPhraseEnd
- the splitTranscriptAtPhraseEndpublic RecognizeOptions.Builder speechDetectorSensitivity(Float speechDetectorSensitivity)
speechDetectorSensitivity
- the speechDetectorSensitivitypublic RecognizeOptions.Builder backgroundAudioSuppression(Float backgroundAudioSuppression)
backgroundAudioSuppression
- the backgroundAudioSuppressionpublic RecognizeOptions.Builder lowLatency(Boolean lowLatency)
lowLatency
- the lowLatencypublic RecognizeOptions.Builder audio(File audio) throws FileNotFoundException
audio
- the audioFileNotFoundException
- if the file could not be foundCopyright © 2021 IBM Cloud. All rights reserved.