123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- syntax = "proto3";
- package google.cloud.mediatranslation.v1beta1;
- import "google/api/field_behavior.proto";
- import "google/rpc/status.proto";
- import "google/api/client.proto";
- option cc_enable_arenas = true;
- option go_package = "google.golang.org/genproto/googleapis/cloud/mediatranslation/v1beta1;mediatranslation";
- option java_multiple_files = true;
- option java_outer_classname = "MediaTranslationProto";
- option java_package = "com.google.cloud.mediatranslation.v1beta1";
- option csharp_namespace = "Google.Cloud.MediaTranslation.V1Beta1";
- option ruby_package = "Google::Cloud::MediaTranslation::V1beta1";
- option php_namespace = "Google\\Cloud\\MediaTranslation\\V1beta1";
- service SpeechTranslationService {
- option (google.api.default_host) = "mediatranslation.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
-
- rpc StreamingTranslateSpeech(stream StreamingTranslateSpeechRequest) returns (stream StreamingTranslateSpeechResponse) {
- }
- }
- message TranslateSpeechConfig {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
-
- string source_language_code = 2 [(google.api.field_behavior) = REQUIRED];
-
- string target_language_code = 3 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
- int32 sample_rate_hertz = 4 [(google.api.field_behavior) = OPTIONAL];
-
-
-
- string model = 5 [(google.api.field_behavior) = OPTIONAL];
- }
- message StreamingTranslateSpeechConfig {
-
- TranslateSpeechConfig audio_config = 1 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- bool single_utterance = 2 [(google.api.field_behavior) = OPTIONAL];
- }
- message StreamingTranslateSpeechRequest {
-
- oneof streaming_request {
-
-
-
- StreamingTranslateSpeechConfig streaming_config = 1;
-
-
-
-
-
-
-
-
- bytes audio_content = 2;
- }
- }
- message StreamingTranslateSpeechResult {
-
- message TextTranslationResult {
-
- string translation = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
-
-
-
-
-
-
- bool is_final = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
-
- oneof result {
-
- TextTranslationResult text_translation_result = 1;
- }
- }
- message StreamingTranslateSpeechResponse {
-
- enum SpeechEventType {
-
- SPEECH_EVENT_TYPE_UNSPECIFIED = 0;
-
-
-
-
-
-
-
-
-
-
- END_OF_SINGLE_UTTERANCE = 1;
- }
-
-
- google.rpc.Status error = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
-
-
- StreamingTranslateSpeechResult result = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- SpeechEventType speech_event_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
|