Service Client: Google::Cloud::Speech::V2::CloudSpeech::SpeechClient
Client stub representing the remote Speech gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to speech.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Speech::V2::CloudSpeech - Compiled Protocol Buffers messages for google/cloud/speech/v2/cloud_speech.proto
SYNOPSIS
use Google::Cloud::Speech::V2::CloudSpeech;
my $msg = Google::Cloud::Speech::V2::CloudSpeech::CreateRecognizerRequest->new({
recognizer => $recognizer,
validate_only => $validate_only,
recognizer_id => $recognizer_id,
parent => $parent,
});
# Read or update a field
my $val = $msg->recognizer();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Speech::V2::CloudSpeech::CreateRecognizerRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/speech/v2/cloud_speech.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Speech::V2::CloudSpeech::CreateRecognizerRequest
Request message for the [CreateRecognizer][google.cloud.speech.v2.Speech.CreateRecognizer] method.
Inherits from Protobuf::Message.
Accessors
$msg->recognizer()/$msg->recognizer($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::Recognizer)Required. The Recognizer to create.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the Recognizer, but do not actually create it.
$msg->recognizer_id()/$msg->recognizer_id($value)Type:
StringThe ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location where this Recognizer will be created. The expected format is `projects/{project}/locations/{location}`.
Google::Cloud::Speech::V2::CloudSpeech::OperationMetadata
Represents the metadata of a long-running operation.
Inherits from Protobuf::Message.
Accessors
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The time the operation was created.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The time the operation was last updated.
$msg->resource()/$msg->resource($value)Type:
StringThe resource path for the target of the operation.
$msg->method()/$msg->method($value)Type:
StringThe method that triggered the operation.
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringThe [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the Operation is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
$msg->kms_key_version_name()/$msg->kms_key_version_name($value)Type:
StringThe [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the Operation is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
$msg->batch_recognize_request()/$msg->batch_recognize_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeRequest)The BatchRecognizeRequest that spawned the Operation.
$msg->create_recognizer_request()/$msg->create_recognizer_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CreateRecognizerRequest)The CreateRecognizerRequest that spawned the Operation.
$msg->update_recognizer_request()/$msg->update_recognizer_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UpdateRecognizerRequest)The UpdateRecognizerRequest that spawned the Operation.
$msg->delete_recognizer_request()/$msg->delete_recognizer_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::DeleteRecognizerRequest)The DeleteRecognizerRequest that spawned the Operation.
$msg->undelete_recognizer_request()/$msg->undelete_recognizer_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UndeleteRecognizerRequest)The UndeleteRecognizerRequest that spawned the Operation.
$msg->create_custom_class_request()/$msg->create_custom_class_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CreateCustomClassRequest)The CreateCustomClassRequest that spawned the Operation.
$msg->update_custom_class_request()/$msg->update_custom_class_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UpdateCustomClassRequest)The UpdateCustomClassRequest that spawned the Operation.
$msg->delete_custom_class_request()/$msg->delete_custom_class_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::DeleteCustomClassRequest)The DeleteCustomClassRequest that spawned the Operation.
$msg->undelete_custom_class_request()/$msg->undelete_custom_class_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UndeleteCustomClassRequest)The UndeleteCustomClassRequest that spawned the Operation.
$msg->create_phrase_set_request()/$msg->create_phrase_set_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CreatePhraseSetRequest)The CreatePhraseSetRequest that spawned the Operation.
$msg->update_phrase_set_request()/$msg->update_phrase_set_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UpdatePhraseSetRequest)The UpdatePhraseSetRequest that spawned the Operation.
$msg->delete_phrase_set_request()/$msg->delete_phrase_set_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::DeletePhraseSetRequest)The DeletePhraseSetRequest that spawned the Operation.
$msg->undelete_phrase_set_request()/$msg->undelete_phrase_set_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UndeletePhraseSetRequest)The UndeletePhraseSetRequest that spawned the Operation.
$msg->update_config_request()/$msg->update_config_request($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::UpdateConfigRequest)The UpdateConfigRequest that spawned the Operation.
$msg->progress_percent()/$msg->progress_percent($value)Type:
Int32The percent progress of the Operation. Values can range from 0-100. If the value is 100, then the operation is finished.
$msg->batch_recognize_metadata()/$msg->batch_recognize_metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeMetadata)Metadata specific to the BatchRecognize method.
Google::Cloud::Speech::V2::CloudSpeech::ListRecognizersRequest
Request message for the [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] method.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location of Recognizers to list. The expected format is `projects/{project}/locations/{location}`.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of Recognizers to return. The service may return fewer than this value. If unspecified, at most 5 Recognizers will be returned. The maximum value is 100; values above 100 will be coerced to 100.
$msg->page_token()/$msg->page_token($value)Type:
StringA page token, received from a previous [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] must match the call that provided the page token.
$msg->show_deleted()/$msg->show_deleted($value)Type:
BoolWhether, or not, to show resources that have been deleted.
Google::Cloud::Speech::V2::CloudSpeech::ListRecognizersResponse
Response message for the [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] method.
Inherits from Protobuf::Message.
Accessors
$msg->recognizers()/$msg->recognizers($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::Recognizer)The list of requested Recognizers.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token, which can be sent as [page_token][google.cloud.speech.v2.ListRecognizersRequest.page_token] to retrieve the next page. If this field is omitted, there are no subsequent pages. This token expires after 72 hours.
Google::Cloud::Speech::V2::CloudSpeech::GetRecognizerRequest
Request message for the [GetRecognizer][google.cloud.speech.v2.Speech.GetRecognizer] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the Recognizer to retrieve. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`.
Google::Cloud::Speech::V2::CloudSpeech::UpdateRecognizerRequest
Request message for the [UpdateRecognizer][google.cloud.speech.v2.Speech.UpdateRecognizer] method.
Inherits from Protobuf::Message.
Accessors
$msg->recognizer()/$msg->recognizer($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::Recognizer)Required. The Recognizer to update.
The Recognizer's `name` field is used to identify the Recognizer to update. Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields to update. If empty, all non-default valued fields are considered for update. Use `*` to update the entire Recognizer resource.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the updated Recognizer, but do not actually update it.
Google::Cloud::Speech::V2::CloudSpeech::DeleteRecognizerRequest
Request message for the [DeleteRecognizer][google.cloud.speech.v2.Speech.DeleteRecognizer] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the Recognizer to delete. Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the deleted Recognizer, but do not actually delete it.
$msg->allow_missing()/$msg->allow_missing($value)Type:
BoolIf set to true, and the Recognizer is not found, the request will succeed and be a no-op (no Operation is recorded in this case).
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
Google::Cloud::Speech::V2::CloudSpeech::UndeleteRecognizerRequest
Request message for the [UndeleteRecognizer][google.cloud.speech.v2.Speech.UndeleteRecognizer] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the Recognizer to undelete. Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the undeleted Recognizer, but do not actually undelete it.
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
Google::Cloud::Speech::V2::CloudSpeech::Recognizer
A Recognizer message. Stores recognition configuration and metadata.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. Identifier. The resource name of the Recognizer. Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
$msg->uid()/$msg->uid($value)Type:
StringOutput only. System-assigned unique identifier for the Recognizer.
$msg->display_name()/$msg->display_name($value)Type:
StringUser-settable, human-readable name for the Recognizer. Must be 63 characters or less.
$msg->model()/$msg->model($value)Type:
StringOptional. This field is now deprecated. Prefer the [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
Which model to use for recognition requests. Select the model best suited to your domain to get best results.
Guidance for choosing which model to use can be found in the [Transcription Models Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) and the models supported in each region can be found in the [Table Of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
$msg->language_codes()/$msg->language_codes($value)Type:
StringOptional. This field is now deprecated. Prefer the [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes] field in the [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio. When you create or update a Recognizer, these values are stored in normalized BCP-47 form. For example, "en-us" is stored as "en-US".
$msg->default_recognition_config()/$msg->default_recognition_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig)Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the [RecognizeRequest.config][google.cloud.speech.v2.RecognizeRequest.config] field.
$msg->annotations()/$msg->annotations($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::Recognizer::AnnotationsEntry)Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Speech::V2::Recognizer::State)Output only. The Recognizer lifecycle state.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. Creation time.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The most recent time this Recognizer was modified.
$msg->delete_time()/$msg->delete_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this Recognizer was requested for deletion.
$msg->expire_time()/$msg->expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this Recognizer will be purged.
$msg->etag()/$msg->etag($value)Type:
StringOutput only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
$msg->reconciling()/$msg->reconciling($value)Type:
BoolOutput only. Whether or not this Recognizer is in the process of being updated.
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringOutput only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the Recognizer is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
$msg->kms_key_version_name()/$msg->kms_key_version_name($value)Type:
StringOutput only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which the Recognizer is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
Enum: Recognizer::State
STATE_UNSPECIFIED=>0ACTIVE=>2DELETED=>4
Google::Cloud::Speech::V2::CloudSpeech::AutoDetectDecodingConfig
Automatically detected decoding parameters. Supported for the following encodings:
* WAV_LINEAR16: 16-bit signed little-endian PCM samples in a WAV container.
* WAV_MULAW: 8-bit companded mulaw samples in a WAV container.
* WAV_ALAW: 8-bit companded alaw samples in a WAV container.
* RFC4867_5_AMR: AMR frames with an rfc4867.5 header.
* RFC4867_5_AMRWB: AMR-WB frames with an rfc4867.5 header.
* FLAC: FLAC frames in the "native FLAC" container format.
* MP3: MPEG audio frames with optional (ignored) ID3 metadata.
* OGG_OPUS: Opus audio frames in an Ogg container.
* WEBM_OPUS: Opus audio frames in a WebM container.
* MP4_AAC: AAC audio frames in an MP4 container.
* M4A_AAC: AAC audio frames in an M4A container.
* MOV_AAC: AAC audio frames in an MOV container.
Inherits from Protobuf::Message.
Google::Cloud::Speech::V2::CloudSpeech::ExplicitDecodingConfig
Explicitly specified decoding parameters.
Inherits from Protobuf::Message.
Accessors
$msg->encoding()/$msg->encoding($value)Type:
Enum(Google::Cloud::Speech::V2::ExplicitDecodingConfig::AudioEncoding)Required. Encoding of the audio data sent for recognition.
$msg->sample_rate_hertz()/$msg->sample_rate_hertz($value)Type:
Int32Optional. Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000, and 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of resampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.
$msg->audio_channel_count()/$msg->audio_channel_count($value)Type:
Int32Optional. Number of channels present in the audio data sent for recognition. Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.
The maximum allowed value is 8.
Enum: ExplicitDecodingConfig::AudioEncoding
AUDIO_ENCODING_UNSPECIFIED=>0LINEAR16=>1MULAW=>2ALAW=>3AMR=>4AMR_WB=>5FLAC=>6MP3=>7OGG_OPUS=>8WEBM_OPUS=>9MP4_AAC=>10M4A_AAC=>11MOV_AAC=>12
Google::Cloud::Speech::V2::CloudSpeech::SpeakerDiarizationConfig
Configuration to enable speaker diarization.
Inherits from Protobuf::Message.
Accessors
$msg->min_speaker_count()/$msg->min_speaker_count($value)Type:
Int32Optional. The system automatically determines the number of speakers. This value is not currently used.
$msg->max_speaker_count()/$msg->max_speaker_count($value)Type:
Int32Optional. The system automatically determines the number of speakers. This value is not currently used.
Google::Cloud::Speech::V2::CloudSpeech::CustomPromptConfig
Configuration to enable custom prompt in chirp3.
Inherits from Protobuf::Message.
Accessors
$msg->custom_prompt()/$msg->custom_prompt($value)Type:
StringOptional. The custom instructions to override the existing instructions for chirp3.
Google::Cloud::Speech::V2::CloudSpeech::RecognitionFeatures
Available recognition features.
Inherits from Protobuf::Message.
Accessors
$msg->profanity_filter()/$msg->profanity_filter($value)Type:
BoolIf set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***". If set to `false` or omitted, profanities won't be filtered out.
$msg->enable_word_time_offsets()/$msg->enable_word_time_offsets($value)Type:
BoolIf `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.
$msg->enable_word_confidence()/$msg->enable_word_confidence($value)Type:
BoolIf `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.
$msg->enable_automatic_punctuation()/$msg->enable_automatic_punctuation($value)Type:
BoolIf `true`, adds punctuation to recognition result hypotheses. This feature is only available in select languages. The default `false` value does not add punctuation to result hypotheses.
$msg->enable_spoken_punctuation()/$msg->enable_spoken_punctuation($value)Type:
BoolThe spoken punctuation behavior for the call. If `true`, replaces spoken punctuation with the corresponding symbols in the request. For example, "how are you question mark" becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If `false`, spoken punctuation is not replaced.
$msg->enable_spoken_emojis()/$msg->enable_spoken_emojis($value)Type:
BoolThe spoken emoji behavior for the call. If `true`, adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If `false`, spoken emojis are not replaced.
$msg->multi_channel_mode()/$msg->multi_channel_mode($value)Type:
Enum(Google::Cloud::Speech::V2::RecognitionFeatures::MultiChannelMode)Mode for recognizing multi-channel audio.
$msg->diarization_config()/$msg->diarization_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeakerDiarizationConfig)Configuration to enable speaker diarization. To enable diarization, set this field to an empty SpeakerDiarizationConfig message.
$msg->max_alternatives()/$msg->max_alternatives($value)Type:
Int32Maximum number of recognition hypotheses to be returned. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.
$msg->custom_prompt_config()/$msg->custom_prompt_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomPromptConfig)Optional. Configuration to enable custom prompt for chirp3.
Enum: RecognitionFeatures::MultiChannelMode
MULTI_CHANNEL_MODE_UNSPECIFIED=>0SEPARATE_RECOGNITION_PER_CHANNEL=>1
Google::Cloud::Speech::V2::CloudSpeech::TranscriptNormalization
Transcription normalization configuration. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
Inherits from Protobuf::Message.
Accessors
$msg->entries()/$msg->entries($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::TranscriptNormalization::Entry)A list of replacement entries. We will perform replacement with one entry at a time. For example, the second entry in ["cat" => "dog", "mountain cat" => "mountain dog"] will never be applied because we will always process the first entry before it. At most 100 entries.
Google::Cloud::Speech::V2::CloudSpeech::TranslationConfig
Translation configuration. Use to translate the given audio into text for the desired language.
Inherits from Protobuf::Message.
Accessors
$msg->target_language()/$msg->target_language($value)Type:
StringRequired. The language code to translate to.
Google::Cloud::Speech::V2::CloudSpeech::SpeechAdaptation
Provides "hints" to the speech recognizer to favor specific words and phrases in the results. PhraseSets can be specified as an inline resource, or a reference to an existing PhraseSet resource.
Inherits from Protobuf::Message.
Accessors
$msg->phrase_sets()/$msg->phrase_sets($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechAdaptation::AdaptationPhraseSet)A list of inline or referenced PhraseSets.
$msg->custom_classes()/$msg->custom_classes($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass)A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.
Google::Cloud::Speech::V2::CloudSpeech::DenoiserConfig
Denoiser config. May not be supported for all models and may have no effect.
Inherits from Protobuf::Message.
Accessors
$msg->denoise_audio()/$msg->denoise_audio($value)Type:
BoolDenoise audio before sending to the transcription model.
$msg->snr_threshold()/$msg->snr_threshold($value)Type:
FloatSignal-to-Noise Ratio (SNR) threshold for the denoiser. Here SNR means the loudness of the speech signal. Audio with an SNR below this threshold, meaning the speech is too quiet, will be prevented from being sent to the transcription model.
If snr_threshold=0, no filtering will be applied.
Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig
Provides information to the Recognizer that specifies how to process the recognition request.
Inherits from Protobuf::Message.
Accessors
$msg->auto_decoding_config()/$msg->auto_decoding_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::AutoDetectDecodingConfig)Automatically detect decoding parameters. Preferred for supported formats.
$msg->explicit_decoding_config()/$msg->explicit_decoding_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::ExplicitDecodingConfig)Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
$msg->model()/$msg->model($value)Type:
StringOptional. Which model to use for recognition requests. Select the model best suited to your domain to get best results.
Guidance for choosing which model to use can be found in the [Transcription Models Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) and the models supported in each region can be found in the [Table Of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
$msg->language_codes()/$msg->language_codes($value)Type:
StringOptional. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US".
Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
$msg->features()/$msg->features($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionFeatures)Speech recognition features to enable.
$msg->adaptation()/$msg->adaptation($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechAdaptation)Speech adaptation context that weights recognizer predictions for specific words and phrases.
$msg->transcript_normalization()/$msg->transcript_normalization($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::TranscriptNormalization)Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
$msg->translation_config()/$msg->translation_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::TranslationConfig)Optional. Optional configuration used to automatically run translation on the given audio to the desired language for supported models.
$msg->denoiser_config()/$msg->denoiser_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::DenoiserConfig)Optional. Optional denoiser config. May not be supported for all models and may have no effect.
Google::Cloud::Speech::V2::CloudSpeech::RecognizeRequest
Request message for the [Recognize][google.cloud.speech.v2.Speech.Recognize] method. Either `content` or `uri` must be supplied. Supplying both or neither returns [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
Inherits from Protobuf::Message.
Accessors
$msg->recognizer()/$msg->recognizer($value)Type:
StringRequired. The name of the Recognizer to use during recognition. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. The {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig)Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.
$msg->config_mask()/$msg->config_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (`*`) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.
$msg->content()/$msg->content($value)Type:
BytesThe audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.
$msg->uri()/$msg->uri($value)Type:
StringURI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: `gs://bucket_name/object_name` (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
Google::Cloud::Speech::V2::CloudSpeech::RecognitionResponseMetadata
Metadata about the recognition request and response.
Inherits from Protobuf::Message.
Accessors
$msg->request_id()/$msg->request_id($value)Type:
StringGlobal request identifier auto-generated by the API.
$msg->total_billed_duration()/$msg->total_billed_duration($value)Type:
Message(Google::Protobuf::Duration::Duration)When available, billed audio seconds for the corresponding request.
$msg->prompt()/$msg->prompt($value)Type:
StringOptional. Output only. Provides the prompt used for the recognition request.
Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionAlternative
Alternative hypotheses (a.k.a. n-best list).
Inherits from Protobuf::Message.
Accessors
$msg->transcript()/$msg->transcript($value)Type:
StringTranscript text representing the words that the user spoke.
$msg->confidence()/$msg->confidence($value)Type:
FloatThe 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 set only for the top alternative of a non-streaming result or, of a streaming result where [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is set to `true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
$msg->words()/$msg->words($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::WordInfo)A list of word-specific information for each recognized word. When the [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig] is set, you will see all the words from the beginning of the audio.
Google::Cloud::Speech::V2::CloudSpeech::WordInfo
Word-specific information for recognized words.
Inherits from Protobuf::Message.
Accessors
$msg->start_offset()/$msg->start_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets] is `true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.
$msg->end_offset()/$msg->end_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets] is `true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.
$msg->word()/$msg->word($value)Type:
StringThe word corresponding to this set of information.
$msg->confidence()/$msg->confidence($value)Type:
FloatThe 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 set only for the top alternative of a non-streaming result or, of a streaming result where [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is set to `true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
$msg->speaker_label()/$msg->speaker_label($value)Type:
StringA distinct label is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. `speaker_label` is set if [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig] is given and only in the top alternative.
Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionResult
A speech recognition result corresponding to a portion of the audio.
Inherits from Protobuf::Message.
Accessors
$msg->alternatives()/$msg->alternatives($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionAlternative)May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
$msg->channel_tag()/$msg->channel_tag($value)Type:
Int32For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For `audio_channel_count` = `N`, its output values can range from `1` to `N`.
$msg->result_end_offset()/$msg->result_end_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset of the end of this result relative to the beginning of the audio.
$msg->language_code()/$msg->language_code($value)Type:
StringOutput only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
Google::Cloud::Speech::V2::CloudSpeech::RecognizeResponse
Response message for the [Recognize][google.cloud.speech.v2.Speech.Recognize] method.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionResult)Sequential list of transcription results corresponding to sequential portions of audio.
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionResponseMetadata)Metadata about the recognition.
Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionFeatures
Available recognition features specific to streaming recognition requests.
Inherits from Protobuf::Message.
Accessors
$msg->enable_voice_activity_events()/$msg->enable_voice_activity_events($value)Type:
BoolIf `true`, responses with voice activity speech events will be returned as they are detected.
$msg->interim_results()/$msg->interim_results($value)Type:
BoolWhether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.
$msg->voice_activity_timeout()/$msg->voice_activity_timeout($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionFeatures::VoiceActivityTimeout)If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field `voice_activity_events` must also be set to true.
$msg->endpointing_sensitivity()/$msg->endpointing_sensitivity($value)Type:
Enum(Google::Cloud::Speech::V2::StreamingRecognitionFeatures::EndpointingSensitivity)Optional. Endpointing sensitivity for this stream.
Enum: StreamingRecognitionFeatures::EndpointingSensitivity
ENDPOINTING_SENSITIVITY_UNSPECIFIED=>0ENDPOINTING_SENSITIVITY_STANDARD=>1ENDPOINTING_SENSITIVITY_SUPERSHORT=>2ENDPOINTING_SENSITIVITY_SHORT=>3
Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionConfig
Provides configuration information for the StreamingRecognize request.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig)Required. Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.StreamingRecognitionConfig.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.
$msg->config_mask()/$msg->config_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields in [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] override the values in the Recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the Recognizer for this recognition request. If a wildcard (`*`) is provided, [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] completely overrides and replaces the config in the recognizer for this recognition request.
$msg->streaming_features()/$msg->streaming_features($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionFeatures)Speech recognition features to enable specific to streaming audio recognition requests.
Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognizeRequest
Request message for the [StreamingRecognize][google.cloud.speech.v2.Speech.StreamingRecognize] method. Multiple [StreamingRecognizeRequest][google.cloud.speech.v2.StreamingRecognizeRequest] messages are sent in one call.
If the [Recognizer][google.cloud.speech.v2.Recognizer] referenced by [recognizer][google.cloud.speech.v2.StreamingRecognizeRequest.recognizer] contains a fully specified request configuration then the stream may only contain messages with only [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio] set.
Otherwise the first message must contain a [recognizer][google.cloud.speech.v2.StreamingRecognizeRequest.recognizer] and a [streaming_config][google.cloud.speech.v2.StreamingRecognizeRequest.streaming_config] message that together fully specify the request configuration and must not contain [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio]. All subsequent messages must only have [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio] set.
Inherits from Protobuf::Message.
Accessors
$msg->recognizer()/$msg->recognizer($value)Type:
StringRequired. The name of the Recognizer to use during recognition. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. The {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
$msg->streaming_config()/$msg->streaming_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionConfig)StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.
$msg->audio()/$msg->audio($value)Type:
BytesInline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeRequest
Request message for the [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize] method.
Inherits from Protobuf::Message.
Accessors
$msg->recognizer()/$msg->recognizer($value)Type:
StringRequired. The name of the Recognizer to use during recognition. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. The {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig)Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.
$msg->config_mask()/$msg->config_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (`*`) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.
$msg->files()/$msg->files($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeFileMetadata)Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 15.
$msg->recognition_output_config()/$msg->recognition_output_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionOutputConfig)Configuration options for where to output the transcripts of each file.
$msg->processing_strategy()/$msg->processing_strategy($value)Type:
Enum(Google::Cloud::Speech::V2::BatchRecognizeRequest::ProcessingStrategy)Processing strategy to use for this request.
Enum: BatchRecognizeRequest::ProcessingStrategy
PROCESSING_STRATEGY_UNSPECIFIED=>0DYNAMIC_BATCHING=>1
Google::Cloud::Speech::V2::CloudSpeech::GcsOutputConfig
Output configurations for Cloud Storage.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringThe Cloud Storage URI prefix with which recognition results will be written.
Google::Cloud::Speech::V2::CloudSpeech::InlineOutputConfig
Output configurations for inline response.
Inherits from Protobuf::Message.
Google::Cloud::Speech::V2::CloudSpeech::NativeOutputFileFormatConfig
Output configurations for serialized `BatchRecognizeResults` protos.
Inherits from Protobuf::Message.
Google::Cloud::Speech::V2::CloudSpeech::VttOutputFileFormatConfig
Output configurations for [WebVTT](https://www.w3.org/TR/webvtt1/) formatted subtitle file.
Inherits from Protobuf::Message.
Google::Cloud::Speech::V2::CloudSpeech::SrtOutputFileFormatConfig
Output configurations [SubRip Text](https://www.matroska.org/technical/subtitles.html#srt-subtitles) formatted subtitle file.
Inherits from Protobuf::Message.
Google::Cloud::Speech::V2::CloudSpeech::OutputFormatConfig
Configuration for the format of the results stored to `output`.
Inherits from Protobuf::Message.
Accessors
$msg->native()/$msg->native($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::NativeOutputFileFormatConfig)Configuration for the native output format. If this field is set or if no other output format field is set, then transcripts will be written to the sink in the native format.
$msg->vtt()/$msg->vtt($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::VttOutputFileFormatConfig)Configuration for the VTT output format. If this field is set, then transcripts will be written to the sink in the VTT format.
$msg->srt()/$msg->srt($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SrtOutputFileFormatConfig)Configuration for the SRT output format. If this field is set, then transcripts will be written to the sink in the SRT format.
Google::Cloud::Speech::V2::CloudSpeech::RecognitionOutputConfig
Configuration options for the output(s) of recognition.
Inherits from Protobuf::Message.
Accessors
$msg->gcs_output_config()/$msg->gcs_output_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::GcsOutputConfig)If this message is populated, recognition results are written to the provided Google Cloud Storage URI.
$msg->inline_response_config()/$msg->inline_response_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::InlineOutputConfig)If this message is populated, recognition results are provided in the [BatchRecognizeResponse][google.cloud.speech.v2.BatchRecognizeResponse] message of the Operation when completed. This is only supported when calling [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize] with just one audio file.
$msg->output_format_config()/$msg->output_format_config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::OutputFormatConfig)Optional. Configuration for the format of the results stored to `output`. If unspecified transcripts will be written in the `NATIVE` format only.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeResponse
Response message for [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize] that is packaged into a longrunning [Operation][google.longrunning.Operation].
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeResponse::ResultsEntry)Map from filename to the final result for that file.
$msg->total_billed_duration()/$msg->total_billed_duration($value)Type:
Message(Google::Protobuf::Duration::Duration)When available, billed audio seconds for the corresponding request.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeResults
Output type for Cloud Storage of BatchRecognize transcripts. Though this proto isn't returned in this API anywhere, the Cloud Storage transcripts will be this proto serialized and should be parsed as such.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionResult)Sequential list of transcription results corresponding to sequential portions of audio.
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionResponseMetadata)Metadata about the recognition.
Google::Cloud::Speech::V2::CloudSpeech::CloudStorageResult
Final results written to Cloud Storage.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringThe Cloud Storage URI to which recognition results were written.
$msg->vtt_format_uri()/$msg->vtt_format_uri($value)Type:
StringThe Cloud Storage URI to which recognition results were written as VTT formatted captions. This is populated only when `VTT` output is requested.
$msg->srt_format_uri()/$msg->srt_format_uri($value)Type:
StringThe Cloud Storage URI to which recognition results were written as SRT formatted captions. This is populated only when `SRT` output is requested.
Google::Cloud::Speech::V2::CloudSpeech::InlineResult
Final results returned inline in the recognition response.
Inherits from Protobuf::Message.
Accessors
$msg->transcript()/$msg->transcript($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeResults)The transcript for the audio file.
$msg->vtt_captions()/$msg->vtt_captions($value)Type:
StringThe transcript for the audio file as VTT formatted captions. This is populated only when `VTT` output is requested.
$msg->srt_captions()/$msg->srt_captions($value)Type:
StringThe transcript for the audio file as SRT formatted captions. This is populated only when `SRT` output is requested.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeFileResult
Final results for a single file.
Inherits from Protobuf::Message.
Accessors
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)Error if one was encountered.
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionResponseMetadata)$msg->cloud_storage_result()/$msg->cloud_storage_result($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CloudStorageResult)Recognition results written to Cloud Storage. This is populated only when [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
$msg->inline_result()/$msg->inline_result($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::InlineResult)Recognition results. This is populated only when [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in the [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
$msg->uri()/$msg->uri($value)Type:
StringDeprecated. Use `cloud_storage_result.native_format_uri` instead.
$msg->transcript()/$msg->transcript($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeResults)Deprecated. Use `inline_result.transcript` instead.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeTranscriptionMetadata
Metadata about transcription for a single file (for example, progress percent).
Inherits from Protobuf::Message.
Accessors
$msg->progress_percent()/$msg->progress_percent($value)Type:
Int32How much of the file has been transcribed so far.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)Error if one was encountered.
$msg->uri()/$msg->uri($value)Type:
StringThe Cloud Storage URI to which recognition results will be written.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeMetadata
Operation metadata for [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize].
Inherits from Protobuf::Message.
Accessors
$msg->transcription_metadata()/$msg->transcription_metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeMetadata::TranscriptionMetadataEntry)Map from provided filename to the transcription metadata for that file.
Google::Cloud::Speech::V2::CloudSpeech::BatchRecognizeFileMetadata
Metadata about a single file in a batch for BatchRecognize.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringCloud Storage URI for the audio file.
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionConfig)Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeFileMetadata.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource as well as the [config][google.cloud.speech.v2.BatchRecognizeRequest.config] at the request level.
$msg->config_mask()/$msg->config_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields in [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (`*`) is provided, [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] completely overrides and replaces the config in the recognizer for this recognition request.
Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionResult
A streaming speech recognition result corresponding to a portion of the audio that is currently being processed.
Inherits from Protobuf::Message.
Accessors
$msg->alternatives()/$msg->alternatives($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::SpeechRecognitionAlternative)May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
$msg->is_final()/$msg->is_final($value)Type:
BoolIf `false`, this [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult] represents an interim result that may change. If `true`, this is the final time the speech service will return this particular [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult], the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.
$msg->stability()/$msg->stability($value)Type:
FloatAn estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results ([is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`). The default of 0.0 is a sentinel value indicating `stability` was not set.
$msg->result_end_offset()/$msg->result_end_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset of the end of this result relative to the beginning of the audio.
$msg->channel_tag()/$msg->channel_tag($value)Type:
Int32For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For `audio_channel_count` = `N`, its output values can range from `1` to `N`.
$msg->language_code()/$msg->language_code($value)Type:
StringOutput only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognizeResponse
`StreamingRecognizeResponse` is the only message returned to the client by `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse` messages are streamed back to the client. If there is no recognizable audio then no messages are streamed back to the client.
Here are some examples of `StreamingRecognizeResponse`s that might be returned while processing audio:
1. results { alternatives { transcript: "tube" } stability: 0.01 }
2. results { alternatives { transcript: "to be a" } stability: 0.01 }
3. results { alternatives { transcript: "to be" } stability: 0.9 } results { alternatives { transcript: " or not to be" } stability: 0.01 }
4. results { alternatives { transcript: "to be or not to be" confidence: 0.92 } alternatives { transcript: "to bee or not to bee" } is_final: true }
5. results { alternatives { transcript: " that's" } stability: 0.01 }
6. results { alternatives { transcript: " that is" } stability: 0.9 } results { alternatives { transcript: " the question" } stability: 0.01 }
7. results { alternatives { transcript: " that is the question" confidence: 0.98 } alternatives { transcript: " that was the question" } is_final: true }
Notes:
- Only two of the above responses #4 and #7 contain final results; they are indicated by `is_final: true`. Concatenating these together generates the full transcript: "to be or not to be that is the question".
- The others contain interim `results`. #3 and #6 contain two interim `results`: the first portion has a high stability and is less likely to change; the second portion has a low stability and is very likely to change. A UI designer might choose to show only high stability `results`.
- The specific `stability` and `confidence` values shown above are only for illustrative purposes. Actual values may vary.
- In each response, only one of these fields will be set: `error`, `speech_event_type`, or one or more (repeated) `results`.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::StreamingRecognitionResult)This repeated list contains zero or more results that correspond to consecutive portions of the audio currently being processed. It contains zero or one [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`true` result (the newly settled portion), followed by zero or more [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false` results (the interim results).
$msg->speech_event_type()/$msg->speech_event_type($value)Type:
Enum(Google::Cloud::Speech::V2::StreamingRecognizeResponse::SpeechEventType)Indicates the type of speech event.
$msg->speech_event_offset()/$msg->speech_event_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset between the beginning of the audio and event emission.
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::RecognitionResponseMetadata)Metadata about the recognition.
Enum: StreamingRecognizeResponse::SpeechEventType
SPEECH_EVENT_TYPE_UNSPECIFIED=>0END_OF_SINGLE_UTTERANCE=>1SPEECH_ACTIVITY_BEGIN=>2SPEECH_ACTIVITY_END=>3
Google::Cloud::Speech::V2::CloudSpeech::Config
Message representing the config for the Speech-to-Text API. This includes an optional [KMS key](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which incoming data will be encrypted.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. Identifier. The name of the config resource. There is exactly one config resource per project per location. The expected format is `projects/{project}/locations/{location}/config`.
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringOptional. An optional [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if present, will be used to encrypt Speech-to-Text resources at-rest. Updating this key will not encrypt existing resources using this key; only new resources will be encrypted using this key. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The most recent time this resource was modified.
Google::Cloud::Speech::V2::CloudSpeech::GetConfigRequest
Request message for the [GetConfig][google.cloud.speech.v2.Speech.GetConfig] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is `projects/{project}/locations/{location}/config`.
Google::Cloud::Speech::V2::CloudSpeech::UpdateConfigRequest
Request message for the [UpdateConfig][google.cloud.speech.v2.Speech.UpdateConfig] method.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::Config)Required. The config to update.
The config's `name` field is used to identify the config to be updated. The expected format is `projects/{project}/locations/{location}/config`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields to be updated.
Google::Cloud::Speech::V2::CloudSpeech::CustomClass
CustomClass for biasing in speech recognition. Used to define a set of words or phrases that represents a common concept or theme likely to appear in your audio, for example a list of passenger ship names.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. Identifier. The resource name of the CustomClass. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`.
$msg->uid()/$msg->uid($value)Type:
StringOutput only. System-assigned unique identifier for the CustomClass.
$msg->display_name()/$msg->display_name($value)Type:
StringOptional. User-settable, human-readable name for the CustomClass. Must be 63 characters or less.
$msg->items()/$msg->items($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass::ClassItem)A collection of class items.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Speech::V2::CustomClass::State)Output only. The CustomClass lifecycle state.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. Creation time.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The most recent time this resource was modified.
$msg->delete_time()/$msg->delete_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this resource was requested for deletion.
$msg->expire_time()/$msg->expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this resource will be purged.
$msg->annotations()/$msg->annotations($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass::AnnotationsEntry)Optional. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations.
$msg->etag()/$msg->etag($value)Type:
StringOutput only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
$msg->reconciling()/$msg->reconciling($value)Type:
BoolOutput only. Whether or not this CustomClass is in the process of being updated.
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringOutput only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the CustomClass is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
$msg->kms_key_version_name()/$msg->kms_key_version_name($value)Type:
StringOutput only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which the CustomClass is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
Enum: CustomClass::State
STATE_UNSPECIFIED=>0ACTIVE=>2DELETED=>4
Google::Cloud::Speech::V2::CloudSpeech::PhraseSet
PhraseSet for biasing in speech recognition. A PhraseSet is used to provide "hints" to the speech recognizer to favor specific words and phrases in the results.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. Identifier. The resource name of the PhraseSet. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
$msg->uid()/$msg->uid($value)Type:
StringOutput only. System-assigned unique identifier for the PhraseSet.
$msg->phrases()/$msg->phrases($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::PhraseSet::Phrase)A list of word and phrases.
$msg->boost()/$msg->boost($value)Type:
FloatHint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Valid `boost` values are between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.
$msg->display_name()/$msg->display_name($value)Type:
StringUser-settable, human-readable name for the PhraseSet. Must be 63 characters or less.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Speech::V2::PhraseSet::State)Output only. The PhraseSet lifecycle state.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. Creation time.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The most recent time this resource was modified.
$msg->delete_time()/$msg->delete_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this resource was requested for deletion.
$msg->expire_time()/$msg->expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which this resource will be purged.
$msg->annotations()/$msg->annotations($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::PhraseSet::AnnotationsEntry)Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations.
$msg->etag()/$msg->etag($value)Type:
StringOutput only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
$msg->reconciling()/$msg->reconciling($value)Type:
BoolOutput only. Whether or not this PhraseSet is in the process of being updated.
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringOutput only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
$msg->kms_key_version_name()/$msg->kms_key_version_name($value)Type:
StringOutput only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
Enum: PhraseSet::State
STATE_UNSPECIFIED=>0ACTIVE=>2DELETED=>4
Google::Cloud::Speech::V2::CloudSpeech::CreateCustomClassRequest
Request message for the [CreateCustomClass][google.cloud.speech.v2.Speech.CreateCustomClass] method.
Inherits from Protobuf::Message.
Accessors
$msg->custom_class()/$msg->custom_class($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass)Required. The CustomClass to create.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the CustomClass, but do not actually create it.
$msg->custom_class_id()/$msg->custom_class_id($value)Type:
StringThe ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location where this CustomClass will be created. The expected format is `projects/{project}/locations/{location}`.
Google::Cloud::Speech::V2::CloudSpeech::ListCustomClassesRequest
Request message for the [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] method.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location of CustomClass resources to list. The expected format is `projects/{project}/locations/{location}`.
$msg->page_size()/$msg->page_size($value)Type:
Int32Number of results per requests. A valid page_size ranges from 0 to 100 inclusive. If the page_size is zero or unspecified, a page size of 5 will be chosen. If the page size exceeds 100, it will be coerced down to 100. Note that a call might return fewer results than the requested page size.
$msg->page_token()/$msg->page_token($value)Type:
StringA page token, received from a previous [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] must match the call that provided the page token.
$msg->show_deleted()/$msg->show_deleted($value)Type:
BoolWhether, or not, to show resources that have been deleted.
Google::Cloud::Speech::V2::CloudSpeech::ListCustomClassesResponse
Response message for the [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] method.
Inherits from Protobuf::Message.
Accessors
$msg->custom_classes()/$msg->custom_classes($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass)The list of requested CustomClasses.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token, which can be sent as [page_token][google.cloud.speech.v2.ListCustomClassesRequest.page_token] to retrieve the next page. If this field is omitted, there are no subsequent pages. This token expires after 72 hours.
Google::Cloud::Speech::V2::CloudSpeech::GetCustomClassRequest
Request message for the [GetCustomClass][google.cloud.speech.v2.Speech.GetCustomClass] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the CustomClass to retrieve. The expected format is `projects/{project}/locations/{location}/customClasses/{custom_class}`.
Google::Cloud::Speech::V2::CloudSpeech::UpdateCustomClassRequest
Request message for the [UpdateCustomClass][google.cloud.speech.v2.Speech.UpdateCustomClass] method.
Inherits from Protobuf::Message.
Accessors
$msg->custom_class()/$msg->custom_class($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::CustomClass)Required. The CustomClass to update.
The CustomClass's `name` field is used to identify the CustomClass to update. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields to be updated. If empty, all fields are considered for update.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the updated CustomClass, but do not actually update it.
Google::Cloud::Speech::V2::CloudSpeech::DeleteCustomClassRequest
Request message for the [DeleteCustomClass][google.cloud.speech.v2.Speech.DeleteCustomClass] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the CustomClass to delete. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the deleted CustomClass, but do not actually delete it.
$msg->allow_missing()/$msg->allow_missing($value)Type:
BoolIf set to true, and the CustomClass is not found, the request will succeed and be a no-op (no Operation is recorded in this case).
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
Google::Cloud::Speech::V2::CloudSpeech::UndeleteCustomClassRequest
Request message for the [UndeleteCustomClass][google.cloud.speech.v2.Speech.UndeleteCustomClass] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the CustomClass to undelete. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the undeleted CustomClass, but do not actually undelete it.
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
Google::Cloud::Speech::V2::CloudSpeech::CreatePhraseSetRequest
Request message for the [CreatePhraseSet][google.cloud.speech.v2.Speech.CreatePhraseSet] method.
Inherits from Protobuf::Message.
Accessors
$msg->phrase_set()/$msg->phrase_set($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::PhraseSet)Required. The PhraseSet to create.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the PhraseSet, but do not actually create it.
$msg->phrase_set_id()/$msg->phrase_set_id($value)Type:
StringThe ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location where this PhraseSet will be created. The expected format is `projects/{project}/locations/{location}`.
Google::Cloud::Speech::V2::CloudSpeech::ListPhraseSetsRequest
Request message for the [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] method.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and location of PhraseSet resources to list. The expected format is `projects/{project}/locations/{location}`.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of PhraseSets to return. The service may return fewer than this value. If unspecified, at most 5 PhraseSets will be returned. The maximum value is 100; values above 100 will be coerced to 100.
$msg->page_token()/$msg->page_token($value)Type:
StringA page token, received from a previous [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] must match the call that provided the page token.
$msg->show_deleted()/$msg->show_deleted($value)Type:
BoolWhether, or not, to show resources that have been deleted.
Google::Cloud::Speech::V2::CloudSpeech::ListPhraseSetsResponse
Response message for the [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] method.
Inherits from Protobuf::Message.
Accessors
$msg->phrase_sets()/$msg->phrase_sets($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::PhraseSet)The list of requested PhraseSets.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token, which can be sent as [page_token][google.cloud.speech.v2.ListPhraseSetsRequest.page_token] to retrieve the next page. If this field is omitted, there are no subsequent pages. This token expires after 72 hours.
Google::Cloud::Speech::V2::CloudSpeech::GetPhraseSetRequest
Request message for the [GetPhraseSet][google.cloud.speech.v2.Speech.GetPhraseSet] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the PhraseSet to retrieve. The expected format is `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
Google::Cloud::Speech::V2::CloudSpeech::UpdatePhraseSetRequest
Request message for the [UpdatePhraseSet][google.cloud.speech.v2.Speech.UpdatePhraseSet] method.
Inherits from Protobuf::Message.
Accessors
$msg->phrase_set()/$msg->phrase_set($value)Type:
Message(Google::Cloud::Speech::V2::CloudSpeech::PhraseSet)Required. The PhraseSet to update.
The PhraseSet's `name` field is used to identify the PhraseSet to update. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The list of fields to update. If empty, all non-default valued fields are considered for update. Use `*` to update the entire PhraseSet resource.
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the updated PhraseSet, but do not actually update it.
Google::Cloud::Speech::V2::CloudSpeech::DeletePhraseSetRequest
Request message for the [DeletePhraseSet][google.cloud.speech.v2.Speech.DeletePhraseSet] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the PhraseSet to delete. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the deleted PhraseSet, but do not actually delete it.
$msg->allow_missing()/$msg->allow_missing($value)Type:
BoolIf set to true, and the PhraseSet is not found, the request will succeed and be a no-op (no Operation is recorded in this case).
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
Google::Cloud::Speech::V2::CloudSpeech::UndeletePhraseSetRequest
Request message for the [UndeletePhraseSet][google.cloud.speech.v2.Speech.UndeletePhraseSet] method.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the PhraseSet to undelete. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
$msg->validate_only()/$msg->validate_only($value)Type:
BoolIf set, validate the request and preview the undeleted PhraseSet, but do not actually undelete it.
$msg->etag()/$msg->etag($value)Type:
StringThis checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Speech::V2::CloudSpeech::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.