class SpeechRecognitionAlternative extends Message

Alternative hypotheses (a.k.a. n-best list).

Protobuf type Google\Cloud\Speech\V1\SpeechRecognitionAlternative

Methods

__construct()

No description

string
getTranscript()

Output-only Transcript text representing the words that the user spoke.

setTranscript(string $var)

Output-only Transcript text representing the words that the user spoke.

float
getConfidence()

Output-only The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for is_final=true results. Clients should not rely on the confidence field as it is not guaranteed to be accurate, or even set, in any of the results.

setConfidence(float $var)

Output-only The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for is_final=true results. Clients should not rely on the confidence field as it is not guaranteed to be accurate, or even set, in any of the results.

Details

at line 37
__construct()

at line 48
string getTranscript()

Output-only Transcript text representing the words that the user spoke.

Generated from protobuf field string transcript = 1;

Return Value

string

at line 59
setTranscript(string $var)

Output-only Transcript text representing the words that the user spoke.

Generated from protobuf field string transcript = 1;

Parameters

string $var

at line 77
float getConfidence()

Output-only The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for is_final=true results. Clients should not rely on the confidence field as it is not guaranteed to be accurate, or even set, in any of the results.

The default of 0.0 is a sentinel value indicating confidence was not set.

Generated from protobuf field float confidence = 2;

Return Value

float

at line 94
setConfidence(float $var)

Output-only The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for is_final=true results. Clients should not rely on the confidence field as it is not guaranteed to be accurate, or even set, in any of the results.

The default of 0.0 is a sentinel value indicating confidence was not set.

Generated from protobuf field float confidence = 2;

Parameters

float $var