NAME
Google::Cloud::Speech::V1::Resource - Compiled Protocol Buffers messages for google/cloud/speech/v1/resource.proto
SYNOPSIS
use Google::Cloud::Speech::V1::Resource;
my $msg = Google::Cloud::Speech::V1::Resource::CustomClass->new({
name => $name,
custom_class_id => $custom_class_id,
items => $items,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Speech::V1::Resource::CustomClass->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/speech/v1/resource.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::V1::Resource::CustomClass
A set of words or phrases that represents a common concept likely to appear in your audio, for example a list of passenger ship names. CustomClass items can be substituted into placeholders that you set in PhraseSet phrases.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe resource name of the custom class.
$msg->custom_class_id()/$msg->custom_class_id($value)Type:
StringIf this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.
$msg->items()/$msg->items($value)Type:
Message(Google::Cloud::Speech::V1::Resource::CustomClass::ClassItem)A collection of class items.
Google::Cloud::Speech::V1::Resource::PhraseSet
Provides "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:
StringThe resource name of the phrase set.
$msg->phrases()/$msg->phrases($value)Type:
Message(Google::Cloud::Speech::V1::Resource::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. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values 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.
Google::Cloud::Speech::V1::Resource::SpeechAdaptation
Speech adaptation configuration.
Inherits from Protobuf::Message.
Accessors
$msg->phrase_sets()/$msg->phrase_sets($value)Type:
Message(Google::Cloud::Speech::V1::Resource::PhraseSet)A collection of phrase sets. To specify the hints inline, leave the phrase set's `name` blank and fill in the rest of its fields. Any phrase set can use any custom class.
$msg->phrase_set_references()/$msg->phrase_set_references($value)Type:
StringA collection of phrase set resource names to use.
$msg->custom_classes()/$msg->custom_classes($value)Type:
Message(Google::Cloud::Speech::V1::Resource::CustomClass)A collection of custom classes. To specify the classes inline, leave the class' `name` blank and fill in the rest of its fields, giving it a unique `custom_class_id`. Refer to the inline defined class in phrase hints by its `custom_class_id`.
$msg->abnf_grammar()/$msg->abnf_grammar($value)Type:
Message(Google::Cloud::Speech::V1::Resource::SpeechAdaptation::ABNFGrammar)Augmented Backus-Naur form (ABNF) is a standardized grammar notation comprised by a set of derivation rules. See specifications: https://www.w3.org/TR/speech-grammar
Google::Cloud::Speech::V1::Resource::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::V1::Resource::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.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Speech::V1::Resource::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.