Cloud Speech V2 Client - Class BatchRecognizeFileResult (1.15.0)

Reference documentation and code samples for the Cloud Speech V2 Client class BatchRecognizeFileResult.

Final results for a single file.

Generated from protobuf message google.cloud.speech.v2.BatchRecognizeFileResult

Namespace

Google \ Cloud \ Speech \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ error Google\Rpc\Status

Error if one was encountered.

↳ metadata Google\Cloud\Speech\V2\RecognitionResponseMetadata
↳ cloud_storage_result Google\Cloud\Speech\V2\CloudStorageResult

Recognition results written to Cloud Storage. This is populated only when GcsOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

↳ inline_result Google\Cloud\Speech\V2\InlineResult

Recognition results. This is populated only when InlineOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

↳ uri string

Deprecated. Use cloud_storage_result.native_format_uri instead.

↳ transcript Google\Cloud\Speech\V2\BatchRecognizeResults

Deprecated. Use inline_result.transcript instead.

getError

Error if one was encountered.

Returns
TypeDescription
Google\Rpc\Status|null

hasError

clearError

setError

Error if one was encountered.

Parameter
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this

getMetadata

Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3;

Returns
TypeDescription
Google\Cloud\Speech\V2\RecognitionResponseMetadata|null

hasMetadata

clearMetadata

setMetadata

Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3;

Parameter
NameDescription
var Google\Cloud\Speech\V2\RecognitionResponseMetadata
Returns
TypeDescription
$this

getCloudStorageResult

Recognition results written to Cloud Storage. This is populated only when GcsOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

Returns
TypeDescription
Google\Cloud\Speech\V2\CloudStorageResult|null

hasCloudStorageResult

setCloudStorageResult

Recognition results written to Cloud Storage. This is populated only when GcsOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

Parameter
NameDescription
var Google\Cloud\Speech\V2\CloudStorageResult
Returns
TypeDescription
$this

getInlineResult

Recognition results. This is populated only when InlineOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

Returns
TypeDescription
Google\Cloud\Speech\V2\InlineResult|null

hasInlineResult

setInlineResult

Recognition results. This is populated only when InlineOutputConfig is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].

Parameter
NameDescription
var Google\Cloud\Speech\V2\InlineResult
Returns
TypeDescription
$this

getUri

Deprecated. Use cloud_storage_result.native_format_uri instead.

Returns
TypeDescription
string

setUri

Deprecated. Use cloud_storage_result.native_format_uri instead.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTranscript

Deprecated. Use inline_result.transcript instead.

Returns
TypeDescription
Google\Cloud\Speech\V2\BatchRecognizeResults|null

hasTranscript

clearTranscript

setTranscript

Deprecated. Use inline_result.transcript instead.

Parameter
NameDescription
var Google\Cloud\Speech\V2\BatchRecognizeResults
Returns
TypeDescription
$this

getResult

Returns
TypeDescription
string