diff --git a/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/google/cloud/texttospeech/v1beta1/cloud_tts.proto index 4655acfa..bf4726b8 100644 --- a/google/cloud/texttospeech/v1beta1/cloud_tts.proto +++ b/google/cloud/texttospeech/v1beta1/cloud_tts.proto @@ -30,19 +30,32 @@ service TextToSpeech { // Returns a list of [Voice][google.cloud.texttospeech.v1beta1.Voice] // supported for synthesis. rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) { - option (google.api.http) = { get: "/v1beta1/voices" }; + option (google.api.http) = { + get: "/v1beta1/voices" + }; } // Synthesizes speech synchronously: receive results after all text input // has been processed. rpc SynthesizeSpeech(SynthesizeSpeechRequest) returns (SynthesizeSpeechResponse) { - option (google.api.http) = { post: "/v1beta1/text:synthesize" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/text:synthesize" + body: "*" + }; } } // The top-level message sent by the client for the `ListVoices` method. message ListVoicesRequest { - + // Optional (but recommended) + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If + // specified, the ListVoices call will only return voices that can be used to + // synthesize this language_code. E.g. when specifying "en-NZ", you will get + // supported "en-*" voices; when specifying "no", you will get supported + // "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh" + // will also get supported "cmn-*" voices; specifying "zh-hk" will also get + // supported "yue-*" voices. + string language_code = 1; } // The message returned to the client by the `ListVoices` method. diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml index fb9485f9..44667673 100644 --- a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml +++ b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml @@ -115,6 +115,10 @@ interfaces: # the call is retrying, refer to retry_params_name instead. methods: - name: ListVoices + flattening: + groups: + - parameters: + - language_code request_object_method: true retry_codes_name: idempotent retry_params_name: default