public static class RecognizeOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
RecognizeOptions.Builder()
Instantiates a new builder.
|
RecognizeOptions.Builder(java.io.InputStream audio)
Instantiates a new builder with required properties.
|
RecognizeOptions.Builder(java.io.InputStream audio,
java.lang.String contentType)
Deprecated.
contentType is no longer required, so this constructor will be removed in the next major release.
|
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)
Deprecated.
Use the `languageCustomizationId` setter to specify the customization ID (GUID) of a custom
language model that is to be used with the recognition request. Do not specify both parameters with a request.
|
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 |
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 RecognizeOptions.Builder()
public RecognizeOptions.Builder(java.io.InputStream audio, java.lang.String contentType)
audio
- the audiocontentType
- the contentTypepublic RecognizeOptions.Builder(java.io.InputStream audio)
audio
- the audiopublic RecognizeOptions build()
public RecognizeOptions.Builder addKeyword(java.lang.String keyword)
keyword
- the new keywordpublic RecognizeOptions.Builder interimResults(java.lang.Boolean interimResults)
interimResults
- the interimResultspublic RecognizeOptions.Builder audio(java.io.InputStream audio)
audio
- the audiopublic RecognizeOptions.Builder contentType(java.lang.String contentType)
contentType
- the contentTypepublic 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 audio(java.io.File audio) throws java.io.FileNotFoundException
audio
- the audiojava.io.FileNotFoundException
- if the file could not be found