diff --git a/clients/speech/lib/google_api/speech/v1/api/operations.ex b/clients/speech/lib/google_api/speech/v1/api/operations.ex index 86756284f1..e2bf58aafd 100644 --- a/clients/speech/lib/google_api/speech/v1/api/operations.ex +++ b/clients/speech/lib/google_api/speech/v1/api/operations.ex @@ -86,7 +86,7 @@ defmodule GoogleApi.Speech.V1.Api.Operations do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters diff --git a/clients/speech/lib/google_api/speech/v1/api/projects.ex b/clients/speech/lib/google_api/speech/v1/api/projects.ex index 23c9cf1656..c09aad3748 100644 --- a/clients/speech/lib/google_api/speech/v1/api/projects.ex +++ b/clients/speech/lib/google_api/speech/v1/api/projects.ex @@ -391,7 +391,7 @@ defmodule GoogleApi.Speech.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.Speech.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}/phraseSets` 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. + * `parent` (*type:* `String.t`) - Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}` 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. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/speech/lib/google_api/speech/v1/metadata.ex b/clients/speech/lib/google_api/speech/v1/metadata.ex index 41343e1030..92e13cc86e 100644 --- a/clients/speech/lib/google_api/speech/v1/metadata.ex +++ b/clients/speech/lib/google_api/speech/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Speech.V1 do API client metadata for GoogleApi.Speech.V1. """ - @discovery_revision "20221020" + @discovery_revision "20240222" def discovery_revision(), do: @discovery_revision end diff --git a/clients/speech/lib/google_api/speech/v1/model/abnf_grammar.ex b/clients/speech/lib/google_api/speech/v1/model/abnf_grammar.ex new file mode 100644 index 0000000000..74cfe59277 --- /dev/null +++ b/clients/speech/lib/google_api/speech/v1/model/abnf_grammar.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Speech.V1.Model.ABNFGrammar do + @moduledoc """ + + + ## Attributes + + * `abnfStrings` (*type:* `list(String.t)`, *default:* `nil`) - All declarations and rules of an ABNF grammar broken up into multiple strings that will end up concatenated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :abnfStrings => list(String.t()) | nil + } + + field(:abnfStrings, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.ABNFGrammar do + def decode(value, options) do + GoogleApi.Speech.V1.Model.ABNFGrammar.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Speech.V1.Model.ABNFGrammar do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/speech/lib/google_api/speech/v1/model/custom_class.ex b/clients/speech/lib/google_api/speech/v1/model/custom_class.ex index f2608e8e7c..bd2b0225b4 100644 --- a/clients/speech/lib/google_api/speech/v1/model/custom_class.ex +++ b/clients/speech/lib/google_api/speech/v1/model/custom_class.ex @@ -21,22 +21,52 @@ defmodule GoogleApi.Speech.V1.Model.CustomClass do ## Attributes + * `annotations` (*type:* `map()`, *default:* `nil`) - 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. * `customClassId` (*type:* `String.t`, *default:* `nil`) - If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive. + * `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource was requested for deletion. This field is not used. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used. + * `etag` (*type:* `String.t`, *default:* `nil`) - 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. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource will be purged. This field is not used. * `items` (*type:* `list(GoogleApi.Speech.V1.Model.ClassItem.t)`, *default:* `nil`) - A collection of class items. + * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - 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}`. + * `kmsKeyVersionName` (*type:* `String.t`, *default:* `nil`) - 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}`. * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the custom class. + * `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether or not this CustomClass is in the process of being updated. This field is not used. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The CustomClass lifecycle state. This field is not used. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System-assigned unique identifier for the CustomClass. This field is not used. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :annotations => map() | nil, :customClassId => String.t() | nil, + :deleteTime => DateTime.t() | nil, + :displayName => String.t() | nil, + :etag => String.t() | nil, + :expireTime => DateTime.t() | nil, :items => list(GoogleApi.Speech.V1.Model.ClassItem.t()) | nil, - :name => String.t() | nil + :kmsKeyName => String.t() | nil, + :kmsKeyVersionName => String.t() | nil, + :name => String.t() | nil, + :reconciling => boolean() | nil, + :state => String.t() | nil, + :uid => String.t() | nil } + field(:annotations, type: :map) field(:customClassId) + field(:deleteTime, as: DateTime) + field(:displayName) + field(:etag) + field(:expireTime, as: DateTime) field(:items, as: GoogleApi.Speech.V1.Model.ClassItem, type: :list) + field(:kmsKeyName) + field(:kmsKeyVersionName) field(:name) + field(:reconciling) + field(:state) + field(:uid) end defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.CustomClass do diff --git a/clients/speech/lib/google_api/speech/v1/model/entry.ex b/clients/speech/lib/google_api/speech/v1/model/entry.ex new file mode 100644 index 0000000000..4fc0525361 --- /dev/null +++ b/clients/speech/lib/google_api/speech/v1/model/entry.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Speech.V1.Model.Entry do + @moduledoc """ + A single replacement configuration. + + ## Attributes + + * `caseSensitive` (*type:* `boolean()`, *default:* `nil`) - Whether the search is case sensitive. + * `replace` (*type:* `String.t`, *default:* `nil`) - What to replace with. Max length is 100 characters. + * `search` (*type:* `String.t`, *default:* `nil`) - What to replace. Max length is 100 characters. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :caseSensitive => boolean() | nil, + :replace => String.t() | nil, + :search => String.t() | nil + } + + field(:caseSensitive) + field(:replace) + field(:search) +end + +defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.Entry do + def decode(value, options) do + GoogleApi.Speech.V1.Model.Entry.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Speech.V1.Model.Entry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/speech/lib/google_api/speech/v1/model/operation.ex b/clients/speech/lib/google_api/speech/v1/model/operation.ex index 409766202e..dde07969ce 100644 --- a/clients/speech/lib/google_api/speech/v1/model/operation.ex +++ b/clients/speech/lib/google_api/speech/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Speech.V1.Model.Operation do * `error` (*type:* `GoogleApi.Speech.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/speech/lib/google_api/speech/v1/model/phrase.ex b/clients/speech/lib/google_api/speech/v1/model/phrase.ex index 18a8ae5a23..64eef72004 100644 --- a/clients/speech/lib/google_api/speech/v1/model/phrase.ex +++ b/clients/speech/lib/google_api/speech/v1/model/phrase.ex @@ -17,11 +17,11 @@ defmodule GoogleApi.Speech.V1.Model.Phrase do @moduledoc """ - 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](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value. + 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. ## Attributes - * `boost` (*type:* `number()`, *default:* `nil`) - 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. Speech recognition will skip PhraseSets with a boost value of 0. + * `boost` (*type:* `number()`, *default:* `nil`) - 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` (*type:* `String.t`, *default:* `nil`) - The phrase itself. """ diff --git a/clients/speech/lib/google_api/speech/v1/model/phrase_set.ex b/clients/speech/lib/google_api/speech/v1/model/phrase_set.ex index b1857f9ac2..d58ba3639f 100644 --- a/clients/speech/lib/google_api/speech/v1/model/phrase_set.ex +++ b/clients/speech/lib/google_api/speech/v1/model/phrase_set.ex @@ -21,22 +21,52 @@ defmodule GoogleApi.Speech.V1.Model.PhraseSet do ## Attributes - * `boost` (*type:* `number()`, *default:* `nil`) - 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. Speech recognition will skip PhraseSets with a boost value of 0. + * `annotations` (*type:* `map()`, *default:* `nil`) - 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. + * `boost` (*type:* `number()`, *default:* `nil`) - 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. + * `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource was requested for deletion. This field is not used. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used. + * `etag` (*type:* `String.t`, *default:* `nil`) - 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. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource will be purged. This field is not used. + * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - 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}`. + * `kmsKeyVersionName` (*type:* `String.t`, *default:* `nil`) - 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}`. * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the phrase set. * `phrases` (*type:* `list(GoogleApi.Speech.V1.Model.Phrase.t)`, *default:* `nil`) - A list of word and phrases. + * `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether or not this PhraseSet is in the process of being updated. This field is not used. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The CustomClass lifecycle state. This field is not used. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System-assigned unique identifier for the PhraseSet. This field is not used. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :annotations => map() | nil, :boost => number() | nil, + :deleteTime => DateTime.t() | nil, + :displayName => String.t() | nil, + :etag => String.t() | nil, + :expireTime => DateTime.t() | nil, + :kmsKeyName => String.t() | nil, + :kmsKeyVersionName => String.t() | nil, :name => String.t() | nil, - :phrases => list(GoogleApi.Speech.V1.Model.Phrase.t()) | nil + :phrases => list(GoogleApi.Speech.V1.Model.Phrase.t()) | nil, + :reconciling => boolean() | nil, + :state => String.t() | nil, + :uid => String.t() | nil } + field(:annotations, type: :map) field(:boost) + field(:deleteTime, as: DateTime) + field(:displayName) + field(:etag) + field(:expireTime, as: DateTime) + field(:kmsKeyName) + field(:kmsKeyVersionName) field(:name) field(:phrases, as: GoogleApi.Speech.V1.Model.Phrase, type: :list) + field(:reconciling) + field(:state) + field(:uid) end defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.PhraseSet do diff --git a/clients/speech/lib/google_api/speech/v1/model/recognition_config.ex b/clients/speech/lib/google_api/speech/v1/model/recognition_config.ex index 734ebfb9aa..a9566f59b0 100644 --- a/clients/speech/lib/google_api/speech/v1/model/recognition_config.ex +++ b/clients/speech/lib/google_api/speech/v1/model/recognition_config.ex @@ -39,6 +39,7 @@ defmodule GoogleApi.Speech.V1.Model.RecognitionConfig do * `profanityFilter` (*type:* `boolean()`, *default:* `nil`) - If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. "f***". If set to `false` or omitted, profanities won't be filtered out. * `sampleRateHertz` (*type:* `integer()`, *default:* `nil`) - Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000. 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 re-sampling). This field is optional for FLAC and WAV audio files, but is required for all other audio formats. For details, see AudioEncoding. * `speechContexts` (*type:* `list(GoogleApi.Speech.V1.Model.SpeechContext.t)`, *default:* `nil`) - Array of SpeechContext. A means to provide context to assist the speech recognition. For more information, see [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation). + * `transcriptNormalization` (*type:* `GoogleApi.Speech.V1.Model.TranscriptNormalization.t`, *default:* `nil`) - 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. * `useEnhanced` (*type:* `boolean()`, *default:* `nil`) - Set to true to use an enhanced model for speech recognition. If `use_enhanced` is set to true and the `model` field is not set, then an appropriate enhanced model is chosen if an enhanced model exists for the audio. If `use_enhanced` is true and an enhanced version of the specified model does not exist, then the speech is recognized using the standard version of the specified model. """ @@ -63,6 +64,7 @@ defmodule GoogleApi.Speech.V1.Model.RecognitionConfig do :profanityFilter => boolean() | nil, :sampleRateHertz => integer() | nil, :speechContexts => list(GoogleApi.Speech.V1.Model.SpeechContext.t()) | nil, + :transcriptNormalization => GoogleApi.Speech.V1.Model.TranscriptNormalization.t() | nil, :useEnhanced => boolean() | nil } @@ -84,6 +86,7 @@ defmodule GoogleApi.Speech.V1.Model.RecognitionConfig do field(:profanityFilter) field(:sampleRateHertz) field(:speechContexts, as: GoogleApi.Speech.V1.Model.SpeechContext, type: :list) + field(:transcriptNormalization, as: GoogleApi.Speech.V1.Model.TranscriptNormalization) field(:useEnhanced) end diff --git a/clients/speech/lib/google_api/speech/v1/model/recognize_response.ex b/clients/speech/lib/google_api/speech/v1/model/recognize_response.ex index bd8664018d..103b979853 100644 --- a/clients/speech/lib/google_api/speech/v1/model/recognize_response.ex +++ b/clients/speech/lib/google_api/speech/v1/model/recognize_response.ex @@ -25,6 +25,7 @@ defmodule GoogleApi.Speech.V1.Model.RecognizeResponse do * `results` (*type:* `list(GoogleApi.Speech.V1.Model.SpeechRecognitionResult.t)`, *default:* `nil`) - Sequential list of transcription results corresponding to sequential portions of audio. * `speechAdaptationInfo` (*type:* `GoogleApi.Speech.V1.Model.SpeechAdaptationInfo.t`, *default:* `nil`) - Provides information on adaptation behavior in response * `totalBilledTime` (*type:* `String.t`, *default:* `nil`) - When available, billed audio seconds for the corresponding request. + * `usingLegacyModels` (*type:* `boolean()`, *default:* `nil`) - Whether request used legacy asr models (was not automatically migrated to use conformer models). """ use GoogleApi.Gax.ModelBase @@ -33,13 +34,15 @@ defmodule GoogleApi.Speech.V1.Model.RecognizeResponse do :requestId => String.t() | nil, :results => list(GoogleApi.Speech.V1.Model.SpeechRecognitionResult.t()) | nil, :speechAdaptationInfo => GoogleApi.Speech.V1.Model.SpeechAdaptationInfo.t() | nil, - :totalBilledTime => String.t() | nil + :totalBilledTime => String.t() | nil, + :usingLegacyModels => boolean() | nil } field(:requestId) field(:results, as: GoogleApi.Speech.V1.Model.SpeechRecognitionResult, type: :list) field(:speechAdaptationInfo, as: GoogleApi.Speech.V1.Model.SpeechAdaptationInfo) field(:totalBilledTime) + field(:usingLegacyModels) end defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.RecognizeResponse do diff --git a/clients/speech/lib/google_api/speech/v1/model/speaker_diarization_config.ex b/clients/speech/lib/google_api/speech/v1/model/speaker_diarization_config.ex index b4e4e50261..efa43775eb 100644 --- a/clients/speech/lib/google_api/speech/v1/model/speaker_diarization_config.ex +++ b/clients/speech/lib/google_api/speech/v1/model/speaker_diarization_config.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Speech.V1.Model.SpeakerDiarizationConfig do ## Attributes - * `enableSpeakerDiarization` (*type:* `boolean()`, *default:* `nil`) - If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. + * `enableSpeakerDiarization` (*type:* `boolean()`, *default:* `nil`) - If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_label provided in the WordInfo. * `maxSpeakerCount` (*type:* `integer()`, *default:* `nil`) - Maximum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 6. * `minSpeakerCount` (*type:* `integer()`, *default:* `nil`) - Minimum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 2. * `speakerTag` (*type:* `integer()`, *default:* `nil`) - Output only. Unused. diff --git a/clients/speech/lib/google_api/speech/v1/model/speech_adaptation.ex b/clients/speech/lib/google_api/speech/v1/model/speech_adaptation.ex index 0d89b291c6..7e44388fed 100644 --- a/clients/speech/lib/google_api/speech/v1/model/speech_adaptation.ex +++ b/clients/speech/lib/google_api/speech/v1/model/speech_adaptation.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Speech.V1.Model.SpeechAdaptation do ## Attributes + * `abnfGrammar` (*type:* `GoogleApi.Speech.V1.Model.ABNFGrammar.t`, *default:* `nil`) - 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 * `customClasses` (*type:* `list(GoogleApi.Speech.V1.Model.CustomClass.t)`, *default:* `nil`) - 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`. * `phraseSetReferences` (*type:* `list(String.t)`, *default:* `nil`) - A collection of phrase set resource names to use. * `phraseSets` (*type:* `list(GoogleApi.Speech.V1.Model.PhraseSet.t)`, *default:* `nil`) - 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. @@ -29,11 +30,13 @@ defmodule GoogleApi.Speech.V1.Model.SpeechAdaptation do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :abnfGrammar => GoogleApi.Speech.V1.Model.ABNFGrammar.t() | nil, :customClasses => list(GoogleApi.Speech.V1.Model.CustomClass.t()) | nil, :phraseSetReferences => list(String.t()) | nil, :phraseSets => list(GoogleApi.Speech.V1.Model.PhraseSet.t()) | nil } + field(:abnfGrammar, as: GoogleApi.Speech.V1.Model.ABNFGrammar) field(:customClasses, as: GoogleApi.Speech.V1.Model.CustomClass, type: :list) field(:phraseSetReferences, type: :list) field(:phraseSets, as: GoogleApi.Speech.V1.Model.PhraseSet, type: :list) diff --git a/clients/speech/lib/google_api/speech/v1/model/transcript_normalization.ex b/clients/speech/lib/google_api/speech/v1/model/transcript_normalization.ex new file mode 100644 index 0000000000..9bbc571977 --- /dev/null +++ b/clients/speech/lib/google_api/speech/v1/model/transcript_normalization.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Speech.V1.Model.TranscriptNormalization do + @moduledoc """ + 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. + + ## Attributes + + * `entries` (*type:* `list(GoogleApi.Speech.V1.Model.Entry.t)`, *default:* `nil`) - 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :entries => list(GoogleApi.Speech.V1.Model.Entry.t()) | nil + } + + field(:entries, as: GoogleApi.Speech.V1.Model.Entry, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.TranscriptNormalization do + def decode(value, options) do + GoogleApi.Speech.V1.Model.TranscriptNormalization.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Speech.V1.Model.TranscriptNormalization do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/speech/lib/google_api/speech/v1/model/word_info.ex b/clients/speech/lib/google_api/speech/v1/model/word_info.ex index a43bfe1832..405f43c248 100644 --- a/clients/speech/lib/google_api/speech/v1/model/word_info.ex +++ b/clients/speech/lib/google_api/speech/v1/model/word_info.ex @@ -23,7 +23,8 @@ defmodule GoogleApi.Speech.V1.Model.WordInfo do * `confidence` (*type:* `number()`, *default:* `nil`) - The 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=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. * `endTime` (*type:* `String.t`, *default:* `nil`) - 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=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary. - * `speakerTag` (*type:* `integer()`, *default:* `nil`) - Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only in the top alternative. + * `speakerLabel` (*type:* `String.t`, *default:* `nil`) - Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative. + * `speakerTag` (*type:* `integer()`, *default:* `nil`) - Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead. * `startTime` (*type:* `String.t`, *default:* `nil`) - 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=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary. * `word` (*type:* `String.t`, *default:* `nil`) - The word corresponding to this set of information. """ @@ -33,6 +34,7 @@ defmodule GoogleApi.Speech.V1.Model.WordInfo do @type t :: %__MODULE__{ :confidence => number() | nil, :endTime => String.t() | nil, + :speakerLabel => String.t() | nil, :speakerTag => integer() | nil, :startTime => String.t() | nil, :word => String.t() | nil @@ -40,6 +42,7 @@ defmodule GoogleApi.Speech.V1.Model.WordInfo do field(:confidence) field(:endTime) + field(:speakerLabel) field(:speakerTag) field(:startTime) field(:word)