Skip to content

Commit

Permalink
feat: add translation_config in RecognitionConfig message (#5216)
Browse files Browse the repository at this point in the history
* feat: add `translation_config` in `RecognitionConfig` message

Enables specifying target language to perform automatic translation to.

PiperOrigin-RevId: 621862394

Source-Link: googleapis/googleapis@9deb78b

Source-Link: googleapis/googleapis-gen@f109618
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiZjEwOTYxODQ2MGMzYzJhZDFjMTlmMGZmNmY1OWM0NTFjMmZjODMwZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 5, 2024
1 parent cc25e93 commit c86ddd0
Show file tree
Hide file tree
Showing 4 changed files with 364 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,13 @@ message TranscriptNormalization {
repeated Entry entries = 1;
}

// Translation configuration. Use to translate the given audio into text for the
// desired language.
message TranslationConfig {
// Required. The language code to translate to.
string target_language = 1 [(google.api.field_behavior) = REQUIRED];
}

// Provides "hints" to the speech recognizer to favor specific words and phrases
// in the results. PhraseSets can be specified as an inline resource, or a
// reference to an existing PhraseSet resource.
Expand Down Expand Up @@ -943,6 +950,11 @@ message RecognitionConfig {
// and final transcripts.
TranscriptNormalization transcript_normalization = 11
[(google.api.field_behavior) = OPTIONAL];

// Optional. Optional configuration used to automatically run translation on
// the given audio to the desired language for supported models.
TranslationConfig translation_config = 15
[(google.api.field_behavior) = OPTIONAL];
}

// Request message for the
Expand Down
103 changes: 103 additions & 0 deletions packages/google-cloud-speech/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c86ddd0

Please sign in to comment.