Builder
class Builder
kotlin.Any | |
↳ | android.speech.RecognitionPart.Builder |
A builder for RecognitionPart
Summary
Public constructors | |
---|---|
Creates a new Builder. |
Public methods | |
---|---|
RecognitionPart |
build() Builds the instance. |
RecognitionPart.Builder |
setConfidenceLevel(value: Int) The level of confidence for this part if requested with |
RecognitionPart.Builder |
setFormattedText(value: String) The formatted text version of the recognized part of the result. |
RecognitionPart.Builder |
setRawText(value: String) The |
RecognitionPart.Builder |
setTimestampMillis(value: Long) Non-negative offset of the beginning of this part from the start of the recognition session in milliseconds if requested with |
Public constructors
Builder
Builder(rawText: String)
Creates a new Builder.
Parameters | |
---|---|
rawText |
String: The non-null raw text version of the recognized part of the result. |
Public methods
build
fun build(): RecognitionPart
Builds the instance. This builder should not be touched after calling this!
Return | |
---|---|
RecognitionPart |
This value cannot be null . |
setConfidenceLevel
fun setConfidenceLevel(value: Int): RecognitionPart.Builder
The level of confidence for this part if requested with RecognizerIntent#EXTRA_REQUEST_WORD_CONFIDENCE
.
Otherwise, this should equal CONFIDENCE_LEVEL_UNKNOWN
.
Return | |
---|---|
RecognitionPart.Builder |
This value cannot be null . |
setFormattedText
fun setFormattedText(value: String): RecognitionPart.Builder
The formatted text version of the recognized part of the result. If formatting is enabled with RecognizerIntent#EXTRA_ENABLE_FORMATTING
, it has a non-null
value.
Otherwise, it should be null
by default.
Parameters | |
---|---|
value |
String: This value cannot be null . |
setRawText
fun setRawText(value: String): RecognitionPart.Builder
The non-null
raw text version of the recognized part of the result.
Parameters | |
---|---|
value |
String: This value cannot be null . |
setTimestampMillis
fun setTimestampMillis(value: Long): RecognitionPart.Builder
Non-negative offset of the beginning of this part from the start of the recognition session in milliseconds if requested with RecognizerIntent#EXTRA_REQUEST_WORD_TIMING
.
Otherwise, this should equal 0.
Return | |
---|---|
RecognitionPart.Builder |
This value cannot be null . |