Interface SpeechContextOrBuilder (2.20.0)

public interface SpeechContextOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getPhrases(int index)

public abstract String getPhrases(int index)

Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See usage limits.

repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The phrases at the given index.

getPhrasesBytes(int index)

public abstract ByteString getPhrasesBytes(int index)

Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See usage limits.

repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the phrases at the given index.

getPhrasesCount()

public abstract int getPhrasesCount()

Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See usage limits.

repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of phrases.

getPhrasesList()

public abstract List<String> getPhrasesList()

Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See usage limits.

repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<String>

A list containing the phrases.