diff --git a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts.proto b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts.proto index 7eec1ef4ad0..a10bfe60d24 100644 --- a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts.proto +++ b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -20,6 +19,7 @@ package google.cloud.texttospeech.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.TextToSpeech.V1"; @@ -29,6 +29,10 @@ option java_outer_classname = "TextToSpeechProto"; option java_package = "com.google.cloud.texttospeech.v1"; option php_namespace = "Google\\Cloud\\TextToSpeech\\V1"; option ruby_package = "Google::Cloud::TextToSpeech::V1"; +option (google.api.resource_definition) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" +}; // Service that implements Google Cloud Text-to-Speech API. service TextToSpeech { @@ -83,7 +87,7 @@ enum SsmlVoiceGender { // A female voice. FEMALE = 2; - // A gender-neutral voice. + // A gender-neutral voice. This voice is not yet supported. NEUTRAL = 3; } @@ -105,6 +109,14 @@ enum AudioEncoding { // Chrome and Firefox). The quality of the encoding is considerably higher // than MP3 while using approximately the same bitrate. OGG_OPUS = 3; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + // Audio content returned as MULAW also contains a WAV header. + MULAW = 5; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + // Audio content returned as ALAW also contains a WAV header. + ALAW = 6; } // The message returned to the client by the `ListVoices` method. diff --git a/packages/google-cloud-texttospeech/protos/protos.d.ts b/packages/google-cloud-texttospeech/protos/protos.d.ts index 1856b2158e4..6b81cd6034b 100644 --- a/packages/google-cloud-texttospeech/protos/protos.d.ts +++ b/packages/google-cloud-texttospeech/protos/protos.d.ts @@ -195,7 +195,9 @@ export namespace google { AUDIO_ENCODING_UNSPECIFIED = 0, LINEAR16 = 1, MP3 = 2, - OGG_OPUS = 3 + OGG_OPUS = 3, + MULAW = 5, + ALAW = 6 } /** Properties of a ListVoicesResponse. */ diff --git a/packages/google-cloud-texttospeech/protos/protos.js b/packages/google-cloud-texttospeech/protos/protos.js index a0fe599edbd..e1fe8c6c8c9 100644 --- a/packages/google-cloud-texttospeech/protos/protos.js +++ b/packages/google-cloud-texttospeech/protos/protos.js @@ -380,6 +380,8 @@ * @property {number} LINEAR16=1 LINEAR16 value * @property {number} MP3=2 MP3 value * @property {number} OGG_OPUS=3 OGG_OPUS value + * @property {number} MULAW=5 MULAW value + * @property {number} ALAW=6 ALAW value */ v1.AudioEncoding = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -387,6 +389,8 @@ values[valuesById[1] = "LINEAR16"] = 1; values[valuesById[2] = "MP3"] = 2; values[valuesById[3] = "OGG_OPUS"] = 3; + values[valuesById[5] = "MULAW"] = 5; + values[valuesById[6] = "ALAW"] = 6; return values; })(); @@ -1839,6 +1843,8 @@ case 1: case 2: case 3: + case 5: + case 6: break; } if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) @@ -1892,6 +1898,14 @@ case 3: message.audioEncoding = 3; break; + case "MULAW": + case 5: + message.audioEncoding = 5; + break; + case "ALAW": + case 6: + message.audioEncoding = 6; + break; } if (object.speakingRate != null) message.speakingRate = Number(object.speakingRate); diff --git a/packages/google-cloud-texttospeech/protos/protos.json b/packages/google-cloud-texttospeech/protos/protos.json index 8b0688be9ed..d4c11047ea4 100644 --- a/packages/google-cloud-texttospeech/protos/protos.json +++ b/packages/google-cloud-texttospeech/protos/protos.json @@ -15,7 +15,9 @@ "java_outer_classname": "TextToSpeechProto", "java_package": "com.google.cloud.texttospeech.v1", "php_namespace": "Google\\Cloud\\TextToSpeech\\V1", - "ruby_package": "Google::Cloud::TextToSpeech::V1" + "ruby_package": "Google::Cloud::TextToSpeech::V1", + "(google.api.resource_definition).type": "automl.googleapis.com/Model", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/models/{model}" }, "nested": { "TextToSpeech": { @@ -88,7 +90,9 @@ "AUDIO_ENCODING_UNSPECIFIED": 0, "LINEAR16": 1, "MP3": 2, - "OGG_OPUS": 3 + "OGG_OPUS": 3, + "MULAW": 5, + "ALAW": 6 } }, "ListVoicesResponse": { diff --git a/packages/google-cloud-texttospeech/src/v1/text_to_speech_client_config.json b/packages/google-cloud-texttospeech/src/v1/text_to_speech_client_config.json index e460d95484a..716efc6e558 100644 --- a/packages/google-cloud-texttospeech/src/v1/text_to_speech_client_config.json +++ b/packages/google-cloud-texttospeech/src/v1/text_to_speech_client_config.json @@ -21,12 +21,12 @@ }, "methods": { "ListVoices": { - "timeout_millis": 600000, + "timeout_millis": 300000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "SynthesizeSpeech": { - "timeout_millis": 600000, + "timeout_millis": 300000, "retry_codes_name": "idempotent", "retry_params_name": "default" }