public static class RecognizeOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(java.io.InputStream audio)
Instantiates a new builder with required properties.
|
Modifier and Type | Method and Description |
---|---|
RecognizeOptions.Builder |
acousticCustomizationId(java.lang.String acousticCustomizationId)
Set the acousticCustomizationId.
|
RecognizeOptions.Builder |
addKeyword(java.lang.String keyword)
Adds an keyword to keywords.
|
RecognizeOptions.Builder |
audio(java.io.File audio)
Set the audio.
|
RecognizeOptions.Builder |
audio(java.io.InputStream audio)
Set the audio.
|
RecognizeOptions.Builder |
audioMetrics(java.lang.Boolean audioMetrics)
Set the audioMetrics.
|
RecognizeOptions.Builder |
baseModelVersion(java.lang.String baseModelVersion)
Set the baseModelVersion.
|
RecognizeOptions |
build()
Builds a RecognizeOptions.
|
RecognizeOptions.Builder |
contentType(java.lang.String contentType)
Set the contentType.
|
RecognizeOptions.Builder |
customizationId(java.lang.String customizationId)
Set the customizationId.
|
RecognizeOptions.Builder |
customizationWeight(java.lang.Double customizationWeight)
Set the customizationWeight.
|
RecognizeOptions.Builder |
grammarName(java.lang.String grammarName)
Set the grammarName.
|
RecognizeOptions.Builder |
inactivityTimeout(long inactivityTimeout)
Set the inactivityTimeout.
|
RecognizeOptions.Builder |
interimResults(java.lang.Boolean interimResults)
Set the interimResults.
|
RecognizeOptions.Builder |
keywords(java.util.List<java.lang.String> keywords)
Set the keywords.
|
RecognizeOptions.Builder |
keywordsThreshold(java.lang.Float keywordsThreshold)
Set the keywordsThreshold.
|
RecognizeOptions.Builder |
languageCustomizationId(java.lang.String languageCustomizationId)
Set the languageCustomizationId.
|
RecognizeOptions.Builder |
maxAlternatives(long maxAlternatives)
Set the maxAlternatives.
|
RecognizeOptions.Builder |
model(java.lang.String model)
Set the model.
|
RecognizeOptions.Builder |
processingMetrics(java.lang.Boolean processingMetrics)
Set the processingMetrics.
|
RecognizeOptions.Builder |
processingMetricsInterval(java.lang.Float processingMetricsInterval)
Set the processingMetricsInterval.
|
RecognizeOptions.Builder |
profanityFilter(java.lang.Boolean profanityFilter)
Set the profanityFilter.
|
RecognizeOptions.Builder |
redaction(java.lang.Boolean redaction)
Set the redaction.
|
RecognizeOptions.Builder |
smartFormatting(java.lang.Boolean smartFormatting)
Set the smartFormatting.
|
RecognizeOptions.Builder |
speakerLabels(java.lang.Boolean speakerLabels)
Set the speakerLabels.
|
RecognizeOptions.Builder |
timestamps(java.lang.Boolean timestamps)
Set the timestamps.
|
RecognizeOptions.Builder |
wordAlternativesThreshold(java.lang.Float wordAlternativesThreshold)
Set the wordAlternativesThreshold.
|
RecognizeOptions.Builder |
wordConfidence(java.lang.Boolean wordConfidence)
Set the wordConfidence.
|
public Builder()
public Builder(java.io.InputStream audio)
audio
- the audiopublic RecognizeOptions build()
public RecognizeOptions.Builder addKeyword(java.lang.String keyword)
keyword
- the new keywordpublic RecognizeOptions.Builder audio(java.io.InputStream audio)
audio
- the audiopublic RecognizeOptions.Builder model(java.lang.String model)
model
- the modelpublic RecognizeOptions.Builder languageCustomizationId(java.lang.String languageCustomizationId)
languageCustomizationId
- the languageCustomizationIdpublic RecognizeOptions.Builder acousticCustomizationId(java.lang.String acousticCustomizationId)
acousticCustomizationId
- the acousticCustomizationIdpublic RecognizeOptions.Builder baseModelVersion(java.lang.String baseModelVersion)
baseModelVersion
- the baseModelVersionpublic RecognizeOptions.Builder customizationWeight(java.lang.Double customizationWeight)
customizationWeight
- the customizationWeightpublic RecognizeOptions.Builder inactivityTimeout(long inactivityTimeout)
inactivityTimeout
- the inactivityTimeoutpublic RecognizeOptions.Builder keywords(java.util.List<java.lang.String> keywords)
keywords
- the keywordspublic RecognizeOptions.Builder keywordsThreshold(java.lang.Float keywordsThreshold)
keywordsThreshold
- the keywordsThresholdpublic RecognizeOptions.Builder maxAlternatives(long maxAlternatives)
maxAlternatives
- the maxAlternativespublic RecognizeOptions.Builder wordAlternativesThreshold(java.lang.Float wordAlternativesThreshold)
wordAlternativesThreshold
- the wordAlternativesThresholdpublic RecognizeOptions.Builder wordConfidence(java.lang.Boolean wordConfidence)
wordConfidence
- the wordConfidencepublic RecognizeOptions.Builder timestamps(java.lang.Boolean timestamps)
timestamps
- the timestampspublic RecognizeOptions.Builder profanityFilter(java.lang.Boolean profanityFilter)
profanityFilter
- the profanityFilterpublic RecognizeOptions.Builder smartFormatting(java.lang.Boolean smartFormatting)
smartFormatting
- the smartFormattingpublic RecognizeOptions.Builder speakerLabels(java.lang.Boolean speakerLabels)
speakerLabels
- the speakerLabelspublic RecognizeOptions.Builder customizationId(java.lang.String customizationId)
customizationId
- the customizationIdpublic RecognizeOptions.Builder grammarName(java.lang.String grammarName)
grammarName
- the grammarNamepublic RecognizeOptions.Builder redaction(java.lang.Boolean redaction)
redaction
- the redactionpublic RecognizeOptions.Builder audioMetrics(java.lang.Boolean audioMetrics)
audioMetrics
- the audioMetricspublic RecognizeOptions.Builder contentType(java.lang.String contentType)
contentType
- the contentTypepublic RecognizeOptions.Builder audio(java.io.File audio) throws java.io.FileNotFoundException
audio
- the audiojava.io.FileNotFoundException
- if the file could not be foundpublic RecognizeOptions.Builder interimResults(java.lang.Boolean interimResults)
interimResults
- the interimResultspublic RecognizeOptions.Builder processingMetrics(java.lang.Boolean processingMetrics)
processingMetrics
- the processingMetricspublic RecognizeOptions.Builder processingMetricsInterval(java.lang.Float processingMetricsInterval)
processingMetricsInterval
- the processingMetricsInterval