Skip to content

Commit

Permalink
feat: add translation_config in RecognitionConfig message
Browse files Browse the repository at this point in the history
Enables specifying target language to perform automatic translation to.

PiperOrigin-RevId: 621862394
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 4, 2024
1 parent d6e96e2 commit 9deb78b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions google/cloud/speech/v2/cloud_speech.proto
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

0 comments on commit 9deb78b

Please sign in to comment.