Interface SpeechContextOrBuilder (2.45.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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
List<String>

A list containing the phrases.