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 |
build()
Builds the profile options.
|
RecognizeOptions.Builder |
contentType(java.lang.String contentType)
The format of the audio data specified.
|
RecognizeOptions.Builder |
customizationId(java.lang.String customizationId)
Specifies the customization id(GUID).
|
RecognizeOptions.Builder |
customizationWeight(java.lang.Double customizationWeight)
If a custom model is specified, this parameter tells the service how much weight to give
to words from the custom language model compared to those from the base model.
|
RecognizeOptions.Builder |
inactivityTimeout(java.lang.Integer inactivityTimeout)
Inactivity timeout.
|
RecognizeOptions.Builder |
interimResults(java.lang.Boolean interimResults)
If true, the service sends interim results for the transcription.
|
RecognizeOptions.Builder |
keywords(java.lang.String... keywords)
Specifies an array of keyword strings to be matched in the input audio.
|
RecognizeOptions.Builder |
keywordsThreshold(java.lang.Double keywordsThreshold)
Specifies a minimum level of confidence that the service must have to report a matching keyword in the input
audio.
|
RecognizeOptions.Builder |
maxAlternatives(java.lang.Integer maxAlternatives)
Maximum number of alternative transcripts returned.
|
RecognizeOptions.Builder |
model(java.lang.String model)
Sets the model name used for the recognition.
|
RecognizeOptions.Builder |
profanityFilter(java.lang.Boolean profanityFilter)
If true, filters profanity from all output except for keyword results by replacing inappropriate words with a
series of asterisks.
|
RecognizeOptions.Builder |
session(SpeechSession session)
Sets the session id.
|
RecognizeOptions.Builder |
sessionId(java.lang.String sessionId)
Sets session id.
|
RecognizeOptions.Builder |
smartFormatting(java.lang.Boolean smartFormatting)
If
true, converts dates, times, series of digits and numbers, phone numbers, currency values, and
Internet addresses into more readable, conventional representations in the final transcript of a recognition
request. |
RecognizeOptions.Builder |
speakerLabels(java.lang.Boolean speakerLabels)
If
true, adds speaker labels to the transcript. |
RecognizeOptions.Builder |
timestamps(java.lang.Boolean timestamps)
If true, time alignment for each word is returned.
|
RecognizeOptions.Builder |
wordAlternativesThreshold(java.lang.Double wordAlternativesThreshold)
Specifies a minimum level of confidence that the service must have to report a hypothesis for a word from the
input audio.
|
RecognizeOptions.Builder |
wordConfidence(java.lang.Boolean wordConfidence)
If true, confidence measure per word is returned if available.
|
public RecognizeOptions.Builder()
public RecognizeOptions build()
public RecognizeOptions.Builder contentType(java.lang.String contentType)
audio/flac for Free Lossless Audio Codec (FLAC)audio/l16 for Linear 16-bit Pulse-Code Modulation (PCM)audio/mp3 for MP3audio/mpeg for MPEG-1audio/mulaw for Mulawaudio/webm for Webmaudio/wav for Waveform Audio File Format (WAV)audio/ogg;codecs=opus for OGG format files that use the opus codeccontentType - the content typejava.lang.IllegalArgumentException - when contentType is null or invalidpublic RecognizeOptions.Builder smartFormatting(java.lang.Boolean smartFormatting)
true, converts dates, times, series of digits and numbers, phone numbers, currency values, and
Internet addresses into more readable, conventional representations in the final transcript of a recognition
request. If false (the default), no formatting is performed. Applies to US English transcription
only.smartFormatting - Smart formattingpublic RecognizeOptions.Builder speakerLabels(java.lang.Boolean speakerLabels)
true, adds speaker labels to the transcript.speakerLabels - Labels or "diarization"public RecognizeOptions.Builder customizationWeight(java.lang.Double customizationWeight)
customizationWeight - Labels or "diarization"public RecognizeOptions.Builder profanityFilter(java.lang.Boolean profanityFilter)
profanityFilter - the profanity filterpublic RecognizeOptions.Builder inactivityTimeout(java.lang.Integer inactivityTimeout)
inactivityTimeout - the inactivity timeoutpublic RecognizeOptions.Builder interimResults(java.lang.Boolean interimResults)
SpeechToText.recognizeUsingWebSocket(InputStream, RecognizeOptions, RecognizeCallback) method.interimResults - the interim resultspublic RecognizeOptions.Builder customizationId(java.lang.String customizationId)
customizationId - the customization idpublic RecognizeOptions.Builder keywords(java.lang.String... keywords)
keywords - the keywordspublic RecognizeOptions.Builder keywordsThreshold(java.lang.Double keywordsThreshold)
keywordsThreshold - the keywords thresholdpublic RecognizeOptions.Builder maxAlternatives(java.lang.Integer maxAlternatives)
maxAlternatives - the max alternativespublic RecognizeOptions.Builder model(java.lang.String model)
model - the modelpublic RecognizeOptions.Builder session(SpeechSession session)
session - the SpeechSessionpublic RecognizeOptions.Builder sessionId(java.lang.String sessionId)
sessionId - the session idpublic RecognizeOptions.Builder timestamps(java.lang.Boolean timestamps)
timestamps - the timestampspublic RecognizeOptions.Builder wordAlternativesThreshold(java.lang.Double wordAlternativesThreshold)
wordAlternativesThreshold - the wordAalternatives thresholdpublic RecognizeOptions.Builder wordConfidence(java.lang.Boolean wordConfidence)
wordConfidence - the word confidence