public static class RecognizeOptions.Builder extends Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Modifier and Type | Method and Description |
---|---|
RecognizeOptions |
build()
Builds the profile options.
|
RecognizeOptions.Builder |
contentType(String contentType)
The format of the audio data specified as one of the following values:
audio/flac for Free Lossless Audio Codec (FLAC)
audio/l16 for Linear 16-bit Pulse-Code Modulation (PCM)
audio/wav for Waveform Audio File Format (WAV)
audio/ogg;codecs=opus for Ogg format files that use the opus codec
. |
RecognizeOptions.Builder |
continuous(Boolean continuous)
If true, multiple final results that represent multiple consecutive phrases separated by pauses
are returned.
|
RecognizeOptions.Builder |
inactivityTimeout(Integer inactivityTimeout)
Inactivity timeout.
|
RecognizeOptions.Builder |
interimResults(Boolean interimResults)
If true, the service sends interim results for the transcription.
|
RecognizeOptions.Builder |
keywords(String[] keywords)
Specifies an array of keyword strings to be matched in the input audio.
|
RecognizeOptions.Builder |
keywordsThreshold(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(Integer maxAlternatives)
Maximum number of alternative transcripts returned.
|
RecognizeOptions.Builder |
model(String model)
Sets the model name used for the recognition.
|
RecognizeOptions.Builder |
session(SpeechSession session)
Sets the session id.
|
RecognizeOptions.Builder |
sessionId(String sessionId)
Sets session id.
|
RecognizeOptions.Builder |
timestamps(Boolean timestamps)
If true, time alignment for each word is returned.
|
RecognizeOptions.Builder |
wordAlternativesThreshold(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(Boolean wordConfidence)
If true, confidence measure per word is returned if available.
|
public RecognizeOptions build()
public RecognizeOptions.Builder contentType(String contentType)
audio/flac
for Free Lossless Audio Codec (FLAC)audio/l16
for Linear 16-bit Pulse-Code Modulation (PCM)audio/wav
for Waveform Audio File Format (WAV)audio/ogg;codecs=opus
for Ogg format files that use the opus codeccontentType
- the content typepublic RecognizeOptions.Builder continuous(Boolean continuous)
continuous
- the continuouspublic RecognizeOptions.Builder inactivityTimeout(Integer inactivityTimeout)
inactivityTimeout
- the inactivity timeoutpublic RecognizeOptions.Builder interimResults(Boolean interimResults)
interimResults
- the interim resultspublic RecognizeOptions.Builder keywords(String[] keywords)
keywords
- the keywordspublic RecognizeOptions.Builder keywordsThreshold(Double keywordsThreshold)
keywordsThreshold
- the keywords thresholdpublic RecognizeOptions.Builder maxAlternatives(Integer maxAlternatives)
maxAlternatives
- the max alternativespublic RecognizeOptions.Builder model(String model)
model
- the modelpublic RecognizeOptions.Builder session(SpeechSession session)
session
- the SpeechSession
public RecognizeOptions.Builder sessionId(String sessionId)
sessionId
- the session idpublic RecognizeOptions.Builder timestamps(Boolean timestamps)
timestamps
- the timestampspublic RecognizeOptions.Builder wordAlternativesThreshold(Double wordAlternativesThreshold)
wordAlternativesThreshold
- the wordAalternatives thresholdpublic RecognizeOptions.Builder wordConfidence(Boolean wordConfidence)
wordConfidence
- the word confidenceCopyright © 2015–2016. All rights reserved.