From d8d7c9a602a787c490861d3fe386a2e651dfcae6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:57:33 -0800 Subject: [PATCH] feat: [texttospeech] StreamingSynthesize now supports opus (#5926) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: StreamingSynthesize now supports opus PiperOrigin-RevId: 712905945 Source-Link: https://github.com/googleapis/googleapis/commit/bd72915b189052e76f6a15953941cc56bbc635f6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc8216cfd8a32713f5202feb32f19b927a1399c4 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiZmM4MjE2Y2ZkOGEzMjcxM2Y1MjAyZmViMzJmMTliOTI3YTEzOTljNCJ9 * 🦉 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 Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../cloud/texttospeech/v1/cloud_tts.proto | 20 ++ .../protos/protos.d.ts | 112 ++++++- .../protos/protos.js | 309 +++++++++++++++++- .../protos/protos.json | 28 +- 4 files changed, 466 insertions(+), 3 deletions(-) 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 e545c17b6dc..23b0338db4a 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 @@ -112,6 +112,11 @@ enum AudioEncoding { // 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; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Note that as opposed to LINEAR16, audio will not be wrapped in a WAV (or + // any other) header. + PCM = 7; } // The top-level message sent by the client for the `ListVoices` method. @@ -400,10 +405,25 @@ message SynthesizeSpeechResponse { bytes audio_content = 1; } +// Description of the desired output audio data. +message StreamingAudioConfig { + // Required. The format of the audio byte stream. + // For now, streaming only supports PCM and OGG_OPUS. All other encodings + // will return an error. + AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The synthesis sample rate (in hertz) for this audio. + int32 sample_rate_hertz = 2 [(google.api.field_behavior) = OPTIONAL]; +} + // Provides configuration information for the StreamingSynthesize request. message StreamingSynthesizeConfig { // Required. The desired voice of the synthesized audio. VoiceSelectionParams voice = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The configuration of the synthesized audio. + StreamingAudioConfig streaming_audio_config = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Input to be synthesized. diff --git a/packages/google-cloud-texttospeech/protos/protos.d.ts b/packages/google-cloud-texttospeech/protos/protos.d.ts index 413aae25993..72ab74a4df2 100644 --- a/packages/google-cloud-texttospeech/protos/protos.d.ts +++ b/packages/google-cloud-texttospeech/protos/protos.d.ts @@ -128,7 +128,8 @@ export namespace google { MP3 = 2, OGG_OPUS = 3, MULAW = 5, - ALAW = 6 + ALAW = 6, + PCM = 7 } /** Properties of a ListVoicesRequest. */ @@ -1759,11 +1760,117 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a StreamingAudioConfig. */ + interface IStreamingAudioConfig { + + /** StreamingAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.texttospeech.v1.AudioEncoding|keyof typeof google.cloud.texttospeech.v1.AudioEncoding|null); + + /** StreamingAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + } + + /** Represents a StreamingAudioConfig. */ + class StreamingAudioConfig implements IStreamingAudioConfig { + + /** + * Constructs a new StreamingAudioConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.texttospeech.v1.IStreamingAudioConfig); + + /** StreamingAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.texttospeech.v1.AudioEncoding|keyof typeof google.cloud.texttospeech.v1.AudioEncoding); + + /** StreamingAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** + * Creates a new StreamingAudioConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamingAudioConfig instance + */ + public static create(properties?: google.cloud.texttospeech.v1.IStreamingAudioConfig): google.cloud.texttospeech.v1.StreamingAudioConfig; + + /** + * Encodes the specified StreamingAudioConfig message. Does not implicitly {@link google.cloud.texttospeech.v1.StreamingAudioConfig.verify|verify} messages. + * @param message StreamingAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.texttospeech.v1.IStreamingAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamingAudioConfig message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.StreamingAudioConfig.verify|verify} messages. + * @param message StreamingAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.texttospeech.v1.IStreamingAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamingAudioConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamingAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.StreamingAudioConfig; + + /** + * Decodes a StreamingAudioConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamingAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.StreamingAudioConfig; + + /** + * Verifies a StreamingAudioConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StreamingAudioConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamingAudioConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.StreamingAudioConfig; + + /** + * Creates a plain object from a StreamingAudioConfig message. Also converts values to other types if specified. + * @param message StreamingAudioConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.texttospeech.v1.StreamingAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamingAudioConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamingAudioConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a StreamingSynthesizeConfig. */ interface IStreamingSynthesizeConfig { /** StreamingSynthesizeConfig voice */ voice?: (google.cloud.texttospeech.v1.IVoiceSelectionParams|null); + + /** StreamingSynthesizeConfig streamingAudioConfig */ + streamingAudioConfig?: (google.cloud.texttospeech.v1.IStreamingAudioConfig|null); } /** Represents a StreamingSynthesizeConfig. */ @@ -1778,6 +1885,9 @@ export namespace google { /** StreamingSynthesizeConfig voice. */ public voice?: (google.cloud.texttospeech.v1.IVoiceSelectionParams|null); + /** StreamingSynthesizeConfig streamingAudioConfig. */ + public streamingAudioConfig?: (google.cloud.texttospeech.v1.IStreamingAudioConfig|null); + /** * Creates a new StreamingSynthesizeConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-texttospeech/protos/protos.js b/packages/google-cloud-texttospeech/protos/protos.js index f8bcbf36f30..7a620325213 100644 --- a/packages/google-cloud-texttospeech/protos/protos.js +++ b/packages/google-cloud-texttospeech/protos/protos.js @@ -228,6 +228,7 @@ * @property {number} OGG_OPUS=3 OGG_OPUS value * @property {number} MULAW=5 MULAW value * @property {number} ALAW=6 ALAW value + * @property {number} PCM=7 PCM value */ v1.AudioEncoding = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -237,6 +238,7 @@ values[valuesById[3] = "OGG_OPUS"] = 3; values[valuesById[5] = "MULAW"] = 5; values[valuesById[6] = "ALAW"] = 6; + values[valuesById[7] = "PCM"] = 7; return values; })(); @@ -3401,6 +3403,7 @@ case 3: case 5: case 6: + case 7: break; } if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) @@ -3468,6 +3471,10 @@ case 6: message.audioEncoding = 6; break; + case "PCM": + case 7: + message.audioEncoding = 7; + break; } if (object.speakingRate != null) message.speakingRate = Number(object.speakingRate); @@ -4238,6 +4245,277 @@ return SynthesizeSpeechResponse; })(); + v1.StreamingAudioConfig = (function() { + + /** + * Properties of a StreamingAudioConfig. + * @memberof google.cloud.texttospeech.v1 + * @interface IStreamingAudioConfig + * @property {google.cloud.texttospeech.v1.AudioEncoding|null} [audioEncoding] StreamingAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] StreamingAudioConfig sampleRateHertz + */ + + /** + * Constructs a new StreamingAudioConfig. + * @memberof google.cloud.texttospeech.v1 + * @classdesc Represents a StreamingAudioConfig. + * @implements IStreamingAudioConfig + * @constructor + * @param {google.cloud.texttospeech.v1.IStreamingAudioConfig=} [properties] Properties to set + */ + function StreamingAudioConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamingAudioConfig audioEncoding. + * @member {google.cloud.texttospeech.v1.AudioEncoding} audioEncoding + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @instance + */ + StreamingAudioConfig.prototype.audioEncoding = 0; + + /** + * StreamingAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @instance + */ + StreamingAudioConfig.prototype.sampleRateHertz = 0; + + /** + * Creates a new StreamingAudioConfig instance using the specified properties. + * @function create + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {google.cloud.texttospeech.v1.IStreamingAudioConfig=} [properties] Properties to set + * @returns {google.cloud.texttospeech.v1.StreamingAudioConfig} StreamingAudioConfig instance + */ + StreamingAudioConfig.create = function create(properties) { + return new StreamingAudioConfig(properties); + }; + + /** + * Encodes the specified StreamingAudioConfig message. Does not implicitly {@link google.cloud.texttospeech.v1.StreamingAudioConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {google.cloud.texttospeech.v1.IStreamingAudioConfig} message StreamingAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingAudioConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + return writer; + }; + + /** + * Encodes the specified StreamingAudioConfig message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.StreamingAudioConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {google.cloud.texttospeech.v1.IStreamingAudioConfig} message StreamingAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamingAudioConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.texttospeech.v1.StreamingAudioConfig} StreamingAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingAudioConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.texttospeech.v1.StreamingAudioConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioEncoding = reader.int32(); + break; + } + case 2: { + message.sampleRateHertz = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StreamingAudioConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.texttospeech.v1.StreamingAudioConfig} StreamingAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingAudioConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamingAudioConfig message. + * @function verify + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamingAudioConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + case 7: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + return null; + }; + + /** + * Creates a StreamingAudioConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.texttospeech.v1.StreamingAudioConfig} StreamingAudioConfig + */ + StreamingAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.texttospeech.v1.StreamingAudioConfig) + return object; + var message = new $root.google.cloud.texttospeech.v1.StreamingAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "LINEAR16": + case 1: + message.audioEncoding = 1; + break; + case "MP3": + case 2: + message.audioEncoding = 2; + break; + case "OGG_OPUS": + case 3: + message.audioEncoding = 3; + break; + case "MULAW": + case 5: + message.audioEncoding = 5; + break; + case "ALAW": + case 6: + message.audioEncoding = 6; + break; + case "PCM": + case 7: + message.audioEncoding = 7; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + return message; + }; + + /** + * Creates a plain object from a StreamingAudioConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {google.cloud.texttospeech.v1.StreamingAudioConfig} message StreamingAudioConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamingAudioConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + } + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.texttospeech.v1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.texttospeech.v1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + return object; + }; + + /** + * Converts this StreamingAudioConfig to JSON. + * @function toJSON + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @instance + * @returns {Object.} JSON object + */ + StreamingAudioConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamingAudioConfig + * @function getTypeUrl + * @memberof google.cloud.texttospeech.v1.StreamingAudioConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamingAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.texttospeech.v1.StreamingAudioConfig"; + }; + + return StreamingAudioConfig; + })(); + v1.StreamingSynthesizeConfig = (function() { /** @@ -4245,6 +4523,7 @@ * @memberof google.cloud.texttospeech.v1 * @interface IStreamingSynthesizeConfig * @property {google.cloud.texttospeech.v1.IVoiceSelectionParams|null} [voice] StreamingSynthesizeConfig voice + * @property {google.cloud.texttospeech.v1.IStreamingAudioConfig|null} [streamingAudioConfig] StreamingSynthesizeConfig streamingAudioConfig */ /** @@ -4270,6 +4549,14 @@ */ StreamingSynthesizeConfig.prototype.voice = null; + /** + * StreamingSynthesizeConfig streamingAudioConfig. + * @member {google.cloud.texttospeech.v1.IStreamingAudioConfig|null|undefined} streamingAudioConfig + * @memberof google.cloud.texttospeech.v1.StreamingSynthesizeConfig + * @instance + */ + StreamingSynthesizeConfig.prototype.streamingAudioConfig = null; + /** * Creates a new StreamingSynthesizeConfig instance using the specified properties. * @function create @@ -4296,6 +4583,8 @@ writer = $Writer.create(); if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) $root.google.cloud.texttospeech.v1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.streamingAudioConfig != null && Object.hasOwnProperty.call(message, "streamingAudioConfig")) + $root.google.cloud.texttospeech.v1.StreamingAudioConfig.encode(message.streamingAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -4334,6 +4623,10 @@ message.voice = $root.google.cloud.texttospeech.v1.VoiceSelectionParams.decode(reader, reader.uint32()); break; } + case 4: { + message.streamingAudioConfig = $root.google.cloud.texttospeech.v1.StreamingAudioConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4374,6 +4667,11 @@ if (error) return "voice." + error; } + if (message.streamingAudioConfig != null && message.hasOwnProperty("streamingAudioConfig")) { + var error = $root.google.cloud.texttospeech.v1.StreamingAudioConfig.verify(message.streamingAudioConfig); + if (error) + return "streamingAudioConfig." + error; + } return null; }; @@ -4394,6 +4692,11 @@ throw TypeError(".google.cloud.texttospeech.v1.StreamingSynthesizeConfig.voice: object expected"); message.voice = $root.google.cloud.texttospeech.v1.VoiceSelectionParams.fromObject(object.voice); } + if (object.streamingAudioConfig != null) { + if (typeof object.streamingAudioConfig !== "object") + throw TypeError(".google.cloud.texttospeech.v1.StreamingSynthesizeConfig.streamingAudioConfig: object expected"); + message.streamingAudioConfig = $root.google.cloud.texttospeech.v1.StreamingAudioConfig.fromObject(object.streamingAudioConfig); + } return message; }; @@ -4410,10 +4713,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.voice = null; + object.streamingAudioConfig = null; + } if (message.voice != null && message.hasOwnProperty("voice")) object.voice = $root.google.cloud.texttospeech.v1.VoiceSelectionParams.toObject(message.voice, options); + if (message.streamingAudioConfig != null && message.hasOwnProperty("streamingAudioConfig")) + object.streamingAudioConfig = $root.google.cloud.texttospeech.v1.StreamingAudioConfig.toObject(message.streamingAudioConfig, options); return object; }; diff --git a/packages/google-cloud-texttospeech/protos/protos.json b/packages/google-cloud-texttospeech/protos/protos.json index b30e7e02d7c..59e77dd17bb 100644 --- a/packages/google-cloud-texttospeech/protos/protos.json +++ b/packages/google-cloud-texttospeech/protos/protos.json @@ -90,7 +90,8 @@ "MP3": 2, "OGG_OPUS": 3, "MULAW": 5, - "ALAW": 6 + "ALAW": 6, + "PCM": 7 } }, "ListVoicesRequest": { @@ -440,6 +441,24 @@ } } }, + "StreamingAudioConfig": { + "fields": { + "audioEncoding": { + "type": "AudioEncoding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "StreamingSynthesizeConfig": { "fields": { "voice": { @@ -448,6 +467,13 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "streamingAudioConfig": { + "type": "StreamingAudioConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } },