1. Packages
  2. Google Cloud Native
  3. API Docs
  4. speech
  5. speech/v1
  6. PhraseSet

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.speech/v1.PhraseSet

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Create PhraseSet Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PhraseSet(name: string, args: PhraseSetArgs, opts?: CustomResourceOptions);
@overload
def PhraseSet(resource_name: str,
              args: PhraseSetArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def PhraseSet(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              phrase_set_id: Optional[str] = None,
              boost: Optional[float] = None,
              location: Optional[str] = None,
              name: Optional[str] = None,
              phrases: Optional[Sequence[PhraseArgs]] = None,
              project: Optional[str] = None)
func NewPhraseSet(ctx *Context, name string, args PhraseSetArgs, opts ...ResourceOption) (*PhraseSet, error)
public PhraseSet(string name, PhraseSetArgs args, CustomResourceOptions? opts = null)
public PhraseSet(String name, PhraseSetArgs args)
public PhraseSet(String name, PhraseSetArgs args, CustomResourceOptions options)
type: google-native:speech/v1:PhraseSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PhraseSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PhraseSetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PhraseSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PhraseSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PhraseSetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var phraseSetResource = new GoogleNative.Speech.V1.PhraseSet("phraseSetResource", new()
{
    PhraseSetId = "string",
    Boost = 0,
    Location = "string",
    Name = "string",
    Phrases = new[]
    {
        new GoogleNative.Speech.V1.Inputs.PhraseArgs
        {
            Boost = 0,
            Value = "string",
        },
    },
    Project = "string",
});
Copy
example, err := speech.NewPhraseSet(ctx, "phraseSetResource", &speech.PhraseSetArgs{
	PhraseSetId: pulumi.String("string"),
	Boost:       pulumi.Float64(0),
	Location:    pulumi.String("string"),
	Name:        pulumi.String("string"),
	Phrases: speech.PhraseArray{
		&speech.PhraseArgs{
			Boost: pulumi.Float64(0),
			Value: pulumi.String("string"),
		},
	},
	Project: pulumi.String("string"),
})
Copy
var phraseSetResource = new PhraseSet("phraseSetResource", PhraseSetArgs.builder()
    .phraseSetId("string")
    .boost(0)
    .location("string")
    .name("string")
    .phrases(PhraseArgs.builder()
        .boost(0)
        .value("string")
        .build())
    .project("string")
    .build());
Copy
phrase_set_resource = google_native.speech.v1.PhraseSet("phraseSetResource",
    phrase_set_id="string",
    boost=0,
    location="string",
    name="string",
    phrases=[{
        "boost": 0,
        "value": "string",
    }],
    project="string")
Copy
const phraseSetResource = new google_native.speech.v1.PhraseSet("phraseSetResource", {
    phraseSetId: "string",
    boost: 0,
    location: "string",
    name: "string",
    phrases: [{
        boost: 0,
        value: "string",
    }],
    project: "string",
});
Copy
type: google-native:speech/v1:PhraseSet
properties:
    boost: 0
    location: string
    name: string
    phraseSetId: string
    phrases:
        - boost: 0
          value: string
    project: string
Copy

PhraseSet Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PhraseSet resource accepts the following input properties:

PhraseSetId This property is required. string
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
Boost double
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.
Location Changes to this property will trigger replacement. string
Name string
The resource name of the phrase set.
Phrases List<Pulumi.GoogleNative.Speech.V1.Inputs.Phrase>
A list of word and phrases.
Project Changes to this property will trigger replacement. string
PhraseSetId This property is required. string
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
Boost float64
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.
Location Changes to this property will trigger replacement. string
Name string
The resource name of the phrase set.
Phrases []PhraseArgs
A list of word and phrases.
Project Changes to this property will trigger replacement. string
phraseSetId This property is required. String
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
boost Double
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.
location Changes to this property will trigger replacement. String
name String
The resource name of the phrase set.
phrases List<Phrase>
A list of word and phrases.
project Changes to this property will trigger replacement. String
phraseSetId This property is required. string
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
boost number
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.
location Changes to this property will trigger replacement. string
name string
The resource name of the phrase set.
phrases Phrase[]
A list of word and phrases.
project Changes to this property will trigger replacement. string
phrase_set_id This property is required. str
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
boost float
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.
location Changes to this property will trigger replacement. str
name str
The resource name of the phrase set.
phrases Sequence[PhraseArgs]
A list of word and phrases.
project Changes to this property will trigger replacement. str
phraseSetId This property is required. String
The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
boost Number
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.
location Changes to this property will trigger replacement. String
name String
The resource name of the phrase set.
phrases List<Property Map>
A list of word and phrases.
project Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the PhraseSet resource produces the following output properties:

Annotations Dictionary<string, string>
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.
DeleteTime string
The time at which this resource was requested for deletion. This field is not used.
DisplayName string
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
Etag string
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.
ExpireTime string
The time at which this resource will be purged. This field is not used.
Id string
The provider-assigned unique ID for this managed resource.
KmsKeyName string
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
KmsKeyVersionName string
The KMS key version name 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}.
Reconciling bool
Whether or not this PhraseSet is in the process of being updated. This field is not used.
State string
The CustomClass lifecycle state. This field is not used.
Uid string
System-assigned unique identifier for the PhraseSet. This field is not used.
Annotations map[string]string
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.
DeleteTime string
The time at which this resource was requested for deletion. This field is not used.
DisplayName string
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
Etag string
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.
ExpireTime string
The time at which this resource will be purged. This field is not used.
Id string
The provider-assigned unique ID for this managed resource.
KmsKeyName string
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
KmsKeyVersionName string
The KMS key version name 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}.
Reconciling bool
Whether or not this PhraseSet is in the process of being updated. This field is not used.
State string
The CustomClass lifecycle state. This field is not used.
Uid string
System-assigned unique identifier for the PhraseSet. This field is not used.
annotations Map<String,String>
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.
deleteTime String
The time at which this resource was requested for deletion. This field is not used.
displayName String
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
etag String
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.
expireTime String
The time at which this resource will be purged. This field is not used.
id String
The provider-assigned unique ID for this managed resource.
kmsKeyName String
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
kmsKeyVersionName String
The KMS key version name 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}.
reconciling Boolean
Whether or not this PhraseSet is in the process of being updated. This field is not used.
state String
The CustomClass lifecycle state. This field is not used.
uid String
System-assigned unique identifier for the PhraseSet. This field is not used.
annotations {[key: string]: string}
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.
deleteTime string
The time at which this resource was requested for deletion. This field is not used.
displayName string
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
etag string
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.
expireTime string
The time at which this resource will be purged. This field is not used.
id string
The provider-assigned unique ID for this managed resource.
kmsKeyName string
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
kmsKeyVersionName string
The KMS key version name 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}.
reconciling boolean
Whether or not this PhraseSet is in the process of being updated. This field is not used.
state string
The CustomClass lifecycle state. This field is not used.
uid string
System-assigned unique identifier for the PhraseSet. This field is not used.
annotations Mapping[str, str]
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.
delete_time str
The time at which this resource was requested for deletion. This field is not used.
display_name str
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
etag str
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.
expire_time str
The time at which this resource will be purged. This field is not used.
id str
The provider-assigned unique ID for this managed resource.
kms_key_name str
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
kms_key_version_name str
The KMS key version name 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}.
reconciling bool
Whether or not this PhraseSet is in the process of being updated. This field is not used.
state str
The CustomClass lifecycle state. This field is not used.
uid str
System-assigned unique identifier for the PhraseSet. This field is not used.
annotations Map<String>
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.
deleteTime String
The time at which this resource was requested for deletion. This field is not used.
displayName String
User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.
etag String
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.
expireTime String
The time at which this resource will be purged. This field is not used.
id String
The provider-assigned unique ID for this managed resource.
kmsKeyName String
The KMS key name with which the content of the PhraseSet is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
kmsKeyVersionName String
The KMS key version name 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}.
reconciling Boolean
Whether or not this PhraseSet is in the process of being updated. This field is not used.
state String
The CustomClass lifecycle state. This field is not used.
uid String
System-assigned unique identifier for the PhraseSet. This field is not used.

Supporting Types

Phrase
, PhraseArgs

Boost double
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.
Value string
The phrase itself.
Boost float64
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.
Value string
The phrase itself.
boost Double
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.
value String
The phrase itself.
boost number
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.
value string
The phrase itself.
boost float
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.
value str
The phrase itself.
boost Number
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.
value String
The phrase itself.

PhraseResponse
, PhraseResponseArgs

Boost This property is required. double
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.
Value This property is required. string
The phrase itself.
Boost This property is required. float64
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.
Value This property is required. string
The phrase itself.
boost This property is required. Double
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.
value This property is required. String
The phrase itself.
boost This property is required. number
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.
value This property is required. string
The phrase itself.
boost This property is required. float
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.
value This property is required. str
The phrase itself.
boost This property is required. Number
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.
value This property is required. String
The phrase itself.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi