Documentation ¶
Overview ¶
Package speechdata provides Cloud Speech-to-Text type definitions for CloudEvent data payloads.
Supported CloudEvent Types ¶
- google.cloud.speech.phraseSet.v1.created
- google.cloud.speech.phraseSet.v1.updated
- google.cloud.speech.phraseSet.v1.deleted
- google.cloud.speech.customClass.v1.created
- google.cloud.speech.customClass.v1.updated
- google.cloud.speech.customClass.v1.deleted
Index ¶
- Variables
- type CustomClass
- func (*CustomClass) Descriptor() ([]byte, []int)deprecated
- func (x *CustomClass) GetAnnotations() map[string]string
- func (x *CustomClass) GetCustomClassId() string
- func (x *CustomClass) GetDeleteTime() *timestamppb.Timestamp
- func (x *CustomClass) GetDisplayName() string
- func (x *CustomClass) GetEtag() string
- func (x *CustomClass) GetExpireTime() *timestamppb.Timestamp
- func (x *CustomClass) GetItems() []*CustomClass_ClassItem
- func (x *CustomClass) GetKmsKeyName() string
- func (x *CustomClass) GetKmsKeyVersionName() string
- func (x *CustomClass) GetName() string
- func (x *CustomClass) GetReconciling() bool
- func (x *CustomClass) GetState() CustomClass_State
- func (x *CustomClass) GetUid() string
- func (*CustomClass) ProtoMessage()
- func (x *CustomClass) ProtoReflect() protoreflect.Message
- func (x *CustomClass) Reset()
- func (x *CustomClass) String() string
- type CustomClassEventData
- func (*CustomClassEventData) Descriptor() ([]byte, []int)deprecated
- func (x *CustomClassEventData) GetPayload() *CustomClass
- func (*CustomClassEventData) ProtoMessage()
- func (x *CustomClassEventData) ProtoReflect() protoreflect.Message
- func (x *CustomClassEventData) Reset()
- func (x *CustomClassEventData) String() string
- type CustomClass_ClassItem
- func (*CustomClass_ClassItem) Descriptor() ([]byte, []int)deprecated
- func (x *CustomClass_ClassItem) GetValue() string
- func (*CustomClass_ClassItem) ProtoMessage()
- func (x *CustomClass_ClassItem) ProtoReflect() protoreflect.Message
- func (x *CustomClass_ClassItem) Reset()
- func (x *CustomClass_ClassItem) String() string
- type CustomClass_State
- func (CustomClass_State) Descriptor() protoreflect.EnumDescriptor
- func (x CustomClass_State) Enum() *CustomClass_State
- func (CustomClass_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x CustomClass_State) Number() protoreflect.EnumNumber
- func (x CustomClass_State) String() string
- func (CustomClass_State) Type() protoreflect.EnumType
- type PhraseSet
- func (*PhraseSet) Descriptor() ([]byte, []int)deprecated
- func (x *PhraseSet) GetAnnotations() map[string]string
- func (x *PhraseSet) GetBoost() float32
- func (x *PhraseSet) GetDeleteTime() *timestamppb.Timestamp
- func (x *PhraseSet) GetDisplayName() string
- func (x *PhraseSet) GetEtag() string
- func (x *PhraseSet) GetExpireTime() *timestamppb.Timestamp
- func (x *PhraseSet) GetKmsKeyName() string
- func (x *PhraseSet) GetKmsKeyVersionName() string
- func (x *PhraseSet) GetName() string
- func (x *PhraseSet) GetPhrases() []*PhraseSet_Phrase
- func (x *PhraseSet) GetReconciling() bool
- func (x *PhraseSet) GetState() PhraseSet_State
- func (x *PhraseSet) GetUid() string
- func (*PhraseSet) ProtoMessage()
- func (x *PhraseSet) ProtoReflect() protoreflect.Message
- func (x *PhraseSet) Reset()
- func (x *PhraseSet) String() string
- type PhraseSetEventData
- func (*PhraseSetEventData) Descriptor() ([]byte, []int)deprecated
- func (x *PhraseSetEventData) GetPayload() *PhraseSet
- func (*PhraseSetEventData) ProtoMessage()
- func (x *PhraseSetEventData) ProtoReflect() protoreflect.Message
- func (x *PhraseSetEventData) Reset()
- func (x *PhraseSetEventData) String() string
- type PhraseSet_Phrase
- func (*PhraseSet_Phrase) Descriptor() ([]byte, []int)deprecated
- func (x *PhraseSet_Phrase) GetBoost() float32
- func (x *PhraseSet_Phrase) GetValue() string
- func (*PhraseSet_Phrase) ProtoMessage()
- func (x *PhraseSet_Phrase) ProtoReflect() protoreflect.Message
- func (x *PhraseSet_Phrase) Reset()
- func (x *PhraseSet_Phrase) String() string
- type PhraseSet_State
- func (PhraseSet_State) Descriptor() protoreflect.EnumDescriptor
- func (x PhraseSet_State) Enum() *PhraseSet_State
- func (PhraseSet_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x PhraseSet_State) Number() protoreflect.EnumNumber
- func (x PhraseSet_State) String() string
- func (PhraseSet_State) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( CustomClass_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 2: "ACTIVE", 4: "DELETED", } CustomClass_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "ACTIVE": 2, "DELETED": 4, } )
Enum value maps for CustomClass_State.
var ( PhraseSet_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 2: "ACTIVE", 4: "DELETED", } PhraseSet_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "ACTIVE": 2, "DELETED": 4, } )
Enum value maps for PhraseSet_State.
var File_cloud_speech_v1_data_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CustomClass ¶
type CustomClass struct { // The resource name of the custom class. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // If this custom class is a resource, the custom_class_id is the resource id // of the CustomClass. Case sensitive. CustomClassId string `protobuf:"bytes,2,opt,name=custom_class_id,json=customClassId,proto3" json:"custom_class_id,omitempty"` // A collection of class items. Items []*CustomClass_ClassItem `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` // Output only. The [KMS key // name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which // the content of the ClassItem is encrypted. The expected format is // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. KmsKeyName string `protobuf:"bytes,6,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"` // Output only. The [KMS key version // name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) // with which content of the ClassItem is encrypted. The expected format is // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. KmsKeyVersionName string `protobuf:"bytes,7,opt,name=kms_key_version_name,json=kmsKeyVersionName,proto3" json:"kms_key_version_name,omitempty"` // Output only. System-assigned unique identifier for the CustomClass. // This field is not used. Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // Output only. User-settable, human-readable name for the CustomClass. Must // be 63 characters or less. This field is not used. DisplayName string `protobuf:"bytes,9,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Output only. The CustomClass lifecycle state. // This field is not used. State CustomClass_State `protobuf:"varint,10,opt,name=state,proto3,enum=google.events.cloud.speech.v1.CustomClass_State" json:"state,omitempty"` // Output only. The time at which this resource was requested for deletion. // This field is not used. DeleteTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` // Output only. The time at which this resource will be purged. // This field is not used. ExpireTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` // Output only. 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. // This field is not used. Annotations map[string]string `` /* 164-byte string literal not displayed */ // Output 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. This field is // not used. Etag string `protobuf:"bytes,14,opt,name=etag,proto3" json:"etag,omitempty"` // Output only. Whether or not this CustomClass is in the process of being // updated. This field is not used. Reconciling bool `protobuf:"varint,15,opt,name=reconciling,proto3" json:"reconciling,omitempty"` // contains filtered or unexported fields }
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.
func (*CustomClass) Descriptor
deprecated
func (*CustomClass) Descriptor() ([]byte, []int)
Deprecated: Use CustomClass.ProtoReflect.Descriptor instead.
func (*CustomClass) GetAnnotations ¶
func (x *CustomClass) GetAnnotations() map[string]string
func (*CustomClass) GetCustomClassId ¶
func (x *CustomClass) GetCustomClassId() string
func (*CustomClass) GetDeleteTime ¶
func (x *CustomClass) GetDeleteTime() *timestamppb.Timestamp
func (*CustomClass) GetDisplayName ¶
func (x *CustomClass) GetDisplayName() string
func (*CustomClass) GetEtag ¶
func (x *CustomClass) GetEtag() string
func (*CustomClass) GetExpireTime ¶
func (x *CustomClass) GetExpireTime() *timestamppb.Timestamp
func (*CustomClass) GetItems ¶
func (x *CustomClass) GetItems() []*CustomClass_ClassItem
func (*CustomClass) GetKmsKeyName ¶
func (x *CustomClass) GetKmsKeyName() string
func (*CustomClass) GetKmsKeyVersionName ¶
func (x *CustomClass) GetKmsKeyVersionName() string
func (*CustomClass) GetName ¶
func (x *CustomClass) GetName() string
func (*CustomClass) GetReconciling ¶
func (x *CustomClass) GetReconciling() bool
func (*CustomClass) GetState ¶
func (x *CustomClass) GetState() CustomClass_State
func (*CustomClass) GetUid ¶
func (x *CustomClass) GetUid() string
func (*CustomClass) ProtoMessage ¶
func (*CustomClass) ProtoMessage()
func (*CustomClass) ProtoReflect ¶
func (x *CustomClass) ProtoReflect() protoreflect.Message
func (*CustomClass) Reset ¶
func (x *CustomClass) Reset()
func (*CustomClass) String ¶
func (x *CustomClass) String() string
type CustomClassEventData ¶
type CustomClassEventData struct { // Optional. The CustomClass event payload. Unset for deletion events. Payload *CustomClass `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
The data within all CustomClass events.
func (*CustomClassEventData) Descriptor
deprecated
func (*CustomClassEventData) Descriptor() ([]byte, []int)
Deprecated: Use CustomClassEventData.ProtoReflect.Descriptor instead.
func (*CustomClassEventData) GetPayload ¶
func (x *CustomClassEventData) GetPayload() *CustomClass
func (*CustomClassEventData) ProtoMessage ¶
func (*CustomClassEventData) ProtoMessage()
func (*CustomClassEventData) ProtoReflect ¶
func (x *CustomClassEventData) ProtoReflect() protoreflect.Message
func (*CustomClassEventData) Reset ¶
func (x *CustomClassEventData) Reset()
func (*CustomClassEventData) String ¶
func (x *CustomClassEventData) String() string
type CustomClass_ClassItem ¶
type CustomClass_ClassItem struct { // The class item's value. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
An item of the class.
func (*CustomClass_ClassItem) Descriptor
deprecated
func (*CustomClass_ClassItem) Descriptor() ([]byte, []int)
Deprecated: Use CustomClass_ClassItem.ProtoReflect.Descriptor instead.
func (*CustomClass_ClassItem) GetValue ¶
func (x *CustomClass_ClassItem) GetValue() string
func (*CustomClass_ClassItem) ProtoMessage ¶
func (*CustomClass_ClassItem) ProtoMessage()
func (*CustomClass_ClassItem) ProtoReflect ¶
func (x *CustomClass_ClassItem) ProtoReflect() protoreflect.Message
func (*CustomClass_ClassItem) Reset ¶
func (x *CustomClass_ClassItem) Reset()
func (*CustomClass_ClassItem) String ¶
func (x *CustomClass_ClassItem) String() string
type CustomClass_State ¶
type CustomClass_State int32
Set of states that define the lifecycle of a CustomClass.
const ( // Unspecified state. This is only used/useful for distinguishing // unset values. CustomClass_STATE_UNSPECIFIED CustomClass_State = 0 // The normal and active state. CustomClass_ACTIVE CustomClass_State = 2 // This CustomClass has been deleted. CustomClass_DELETED CustomClass_State = 4 )
func (CustomClass_State) Descriptor ¶
func (CustomClass_State) Descriptor() protoreflect.EnumDescriptor
func (CustomClass_State) Enum ¶
func (x CustomClass_State) Enum() *CustomClass_State
func (CustomClass_State) EnumDescriptor
deprecated
func (CustomClass_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use CustomClass_State.Descriptor instead.
func (CustomClass_State) Number ¶
func (x CustomClass_State) Number() protoreflect.EnumNumber
func (CustomClass_State) String ¶
func (x CustomClass_State) String() string
func (CustomClass_State) Type ¶
func (CustomClass_State) Type() protoreflect.EnumType
type PhraseSet ¶
type PhraseSet struct { // The resource name of the phrase set. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // A list of word and phrases. Phrases []*PhraseSet_Phrase `protobuf:"bytes,2,rep,name=phrases,proto3" json:"phrases,omitempty"` // Hint 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. Boost float32 `protobuf:"fixed32,4,opt,name=boost,proto3" json:"boost,omitempty"` // Output only. The [KMS key // name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which // the content of the PhraseSet is encrypted. The expected format is // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. KmsKeyName string `protobuf:"bytes,7,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"` // Output only. The [KMS key version // name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) // with which content of the PhraseSet is encrypted. The expected format is // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. KmsKeyVersionName string `protobuf:"bytes,8,opt,name=kms_key_version_name,json=kmsKeyVersionName,proto3" json:"kms_key_version_name,omitempty"` // Output only. System-assigned unique identifier for the PhraseSet. // This field is not used. Uid string `protobuf:"bytes,9,opt,name=uid,proto3" json:"uid,omitempty"` // Output only. User-settable, human-readable name for the PhraseSet. Must be // 63 characters or less. This field is not used. DisplayName string `protobuf:"bytes,10,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Output only. The CustomClass lifecycle state. // This field is not used. State PhraseSet_State `protobuf:"varint,11,opt,name=state,proto3,enum=google.events.cloud.speech.v1.PhraseSet_State" json:"state,omitempty"` // Output only. The time at which this resource was requested for deletion. // This field is not used. DeleteTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` // Output only. The time at which this resource will be purged. // This field is not used. ExpireTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` // Output only. 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. // This field is not used. Annotations map[string]string `` /* 164-byte string literal not displayed */ // Output 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. This field is // not used. Etag string `protobuf:"bytes,15,opt,name=etag,proto3" json:"etag,omitempty"` // Output only. Whether or not this PhraseSet is in the process of being // updated. This field is not used. Reconciling bool `protobuf:"varint,16,opt,name=reconciling,proto3" json:"reconciling,omitempty"` // contains filtered or unexported fields }
Provides "hints" to the speech recognizer to favor specific words and phrases in the results.
func (*PhraseSet) Descriptor
deprecated
func (*PhraseSet) GetAnnotations ¶
func (*PhraseSet) GetDeleteTime ¶
func (x *PhraseSet) GetDeleteTime() *timestamppb.Timestamp
func (*PhraseSet) GetDisplayName ¶
func (*PhraseSet) GetExpireTime ¶
func (x *PhraseSet) GetExpireTime() *timestamppb.Timestamp
func (*PhraseSet) GetKmsKeyName ¶
func (*PhraseSet) GetKmsKeyVersionName ¶
func (*PhraseSet) GetPhrases ¶
func (x *PhraseSet) GetPhrases() []*PhraseSet_Phrase
func (*PhraseSet) GetReconciling ¶
func (*PhraseSet) GetState ¶
func (x *PhraseSet) GetState() PhraseSet_State
func (*PhraseSet) ProtoMessage ¶
func (*PhraseSet) ProtoMessage()
func (*PhraseSet) ProtoReflect ¶
func (x *PhraseSet) ProtoReflect() protoreflect.Message
type PhraseSetEventData ¶
type PhraseSetEventData struct { // Optional. The PhraseSet event payload. Unset for deletion events. Payload *PhraseSet `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
The data within all PhraseSet events.
func (*PhraseSetEventData) Descriptor
deprecated
func (*PhraseSetEventData) Descriptor() ([]byte, []int)
Deprecated: Use PhraseSetEventData.ProtoReflect.Descriptor instead.
func (*PhraseSetEventData) GetPayload ¶
func (x *PhraseSetEventData) GetPayload() *PhraseSet
func (*PhraseSetEventData) ProtoMessage ¶
func (*PhraseSetEventData) ProtoMessage()
func (*PhraseSetEventData) ProtoReflect ¶
func (x *PhraseSetEventData) ProtoReflect() protoreflect.Message
func (*PhraseSetEventData) Reset ¶
func (x *PhraseSetEventData) Reset()
func (*PhraseSetEventData) String ¶
func (x *PhraseSetEventData) String() string
type PhraseSet_Phrase ¶
type PhraseSet_Phrase struct { // The phrase itself. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Hint Boost. Overrides the boost set at the phrase set level. // 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 will simply be ignored. Though `boost` can accept a wide range of // positive values, most use cases are best served // with values between 0 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. Boost float32 `protobuf:"fixed32,2,opt,name=boost,proto3" json:"boost,omitempty"` // contains filtered or unexported fields }
A phrases containing words and phrase "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](https://cloud.google.com/speech-to-text/quotas#content).
List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. "i was born in january", "i was born in febuary", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. "i was born in $month"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. "${my-months}". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`).
Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.
func (*PhraseSet_Phrase) Descriptor
deprecated
func (*PhraseSet_Phrase) Descriptor() ([]byte, []int)
Deprecated: Use PhraseSet_Phrase.ProtoReflect.Descriptor instead.
func (*PhraseSet_Phrase) GetBoost ¶
func (x *PhraseSet_Phrase) GetBoost() float32
func (*PhraseSet_Phrase) GetValue ¶
func (x *PhraseSet_Phrase) GetValue() string
func (*PhraseSet_Phrase) ProtoMessage ¶
func (*PhraseSet_Phrase) ProtoMessage()
func (*PhraseSet_Phrase) ProtoReflect ¶
func (x *PhraseSet_Phrase) ProtoReflect() protoreflect.Message
func (*PhraseSet_Phrase) Reset ¶
func (x *PhraseSet_Phrase) Reset()
func (*PhraseSet_Phrase) String ¶
func (x *PhraseSet_Phrase) String() string
type PhraseSet_State ¶
type PhraseSet_State int32
Set of states that define the lifecycle of a CustomClass.
const ( // Unspecified state. This is only used/useful for distinguishing // unset values. PhraseSet_STATE_UNSPECIFIED PhraseSet_State = 0 // The normal and active state. PhraseSet_ACTIVE PhraseSet_State = 2 // This CustomClass has been deleted. PhraseSet_DELETED PhraseSet_State = 4 )
func (PhraseSet_State) Descriptor ¶
func (PhraseSet_State) Descriptor() protoreflect.EnumDescriptor
func (PhraseSet_State) Enum ¶
func (x PhraseSet_State) Enum() *PhraseSet_State
func (PhraseSet_State) EnumDescriptor
deprecated
func (PhraseSet_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use PhraseSet_State.Descriptor instead.
func (PhraseSet_State) Number ¶
func (x PhraseSet_State) Number() protoreflect.EnumNumber
func (PhraseSet_State) String ¶
func (x PhraseSet_State) String() string
func (PhraseSet_State) Type ¶
func (PhraseSet_State) Type() protoreflect.EnumType