public static class RecognizeOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
RecognizeOptions.Builder()
Instantiates a new builder.
|
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 |
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 |
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 |
maxAlternatives(long maxAlternatives)
Set the maxAlternatives.
|
RecognizeOptions.Builder |
model(java.lang.String model)
Set the model.
|
RecognizeOptions.Builder |
profanityFilter(java.lang.Boolean profanityFilter)
Set the profanityFilter.
|
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 RecognizeOptions.Builder()
public RecognizeOptions build()
public RecognizeOptions.Builder addKeyword(java.lang.String keyword)
keyword
- the new keywordpublic RecognizeOptions.Builder model(java.lang.String model)
model
- the modelpublic RecognizeOptions.Builder customizationId(java.lang.String customizationId)
customizationId
- the customizationIdpublic RecognizeOptions.Builder acousticCustomizationId(java.lang.String acousticCustomizationId)
acousticCustomizationId
- the acousticCustomizationIdpublic RecognizeOptions.Builder customizationWeight(java.lang.Double customizationWeight)
customizationWeight
- the customizationWeightpublic RecognizeOptions.Builder baseModelVersion(java.lang.String baseModelVersion)
baseModelVersion
- the baseModelVersionpublic RecognizeOptions.Builder audio(java.io.InputStream audio)
audio
- the audiopublic RecognizeOptions.Builder contentType(java.lang.String contentType)
contentType
- the contentTypepublic 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 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 interimResults