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.
|
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 |
backgroundAudioSuppression(java.lang.Float backgroundAudioSuppression)
Set the backgroundAudioSuppression.
|
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 |
endOfPhraseSilenceTime(java.lang.Double endOfPhraseSilenceTime)
Set the endOfPhraseSilenceTime.
|
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 |
speechDetectorSensitivity(java.lang.Float speechDetectorSensitivity)
Set the speechDetectorSensitivity.
|
RecognizeOptions.Builder |
splitTranscriptAtPhraseEnd(java.lang.Boolean splitTranscriptAtPhraseEnd)
Set the splitTranscriptAtPhraseEnd.
|
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)
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 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 audioMetrics(java.lang.Boolean audioMetrics)
audioMetrics
- the audioMetricspublic RecognizeOptions.Builder interimResults(java.lang.Boolean interimResults)
NOTE: This parameter only works for the `recognizeUsingWebSocket` method.
interimResults
- the interimResultspublic RecognizeOptions.Builder processingMetrics(java.lang.Boolean processingMetrics)
NOTE: This parameter only works for the `recognizeUsingWebSocket` method.
processingMetrics
- the processingMetricspublic RecognizeOptions.Builder processingMetricsInterval(java.lang.Float processingMetricsInterval)
NOTE: This parameter only works for the `recognizeUsingWebSocket` method.
processingMetricsInterval
- the processingMetricsIntervalpublic RecognizeOptions.Builder endOfPhraseSilenceTime(java.lang.Double endOfPhraseSilenceTime)
endOfPhraseSilenceTime
- the endOfPhraseSilenceTimepublic RecognizeOptions.Builder splitTranscriptAtPhraseEnd(java.lang.Boolean splitTranscriptAtPhraseEnd)
splitTranscriptAtPhraseEnd
- the splitTranscriptAtPhraseEndpublic RecognizeOptions.Builder speechDetectorSensitivity(java.lang.Float speechDetectorSensitivity)
speechDetectorSensitivity
- the speechDetectorSensitivitypublic RecognizeOptions.Builder backgroundAudioSuppression(java.lang.Float backgroundAudioSuppression)
backgroundAudioSuppression
- the backgroundAudioSuppressionpublic RecognizeOptions.Builder audio(java.io.File audio) throws java.io.FileNotFoundException
audio
- the audiojava.io.FileNotFoundException
- if the file could not be found