Skip to content

Commit

Permalink
feat: add ALAW support on client library. And improve the ListVoiceRe…
Browse files Browse the repository at this point in the history
…quest message's documentation (#490)

PiperOrigin-RevId: 365608171
Source-Link: googleapis/googleapis@45445f4
Source-Link: googleapis/googleapis-gen@f928970
  • Loading branch information
gcf-owl-bot[bot] authored Mar 30, 2021
1 parent e37b8af commit c4c7ba8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -56,13 +56,14 @@ service TextToSpeech {
// The top-level message sent by the client for the `ListVoices` method.
message ListVoicesRequest {
// Optional. 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
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
// If not specified, the API will return all supported voices.
// 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-NZ" 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.
// supported "yue-hk" voices.
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
}

Expand Down Expand Up @@ -111,6 +112,10 @@ enum AudioEncoding {
// 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.
Expand Down Expand Up @@ -156,7 +161,7 @@ message SynthesizeSpeechRequest {
// Required. The configuration of the synthesized audio.
AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED];

// Whether and what timepoints should be returned in the response.
// Whether and what timepoints are returned in the response.
repeated TimepointType enable_time_pointing = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/google-cloud-texttospeech/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/google-cloud-texttospeech/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/google-cloud-texttospeech/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,14 @@ export class TextToSpeechClient {
* The request object that will be sent.
* @param {string} [request.languageCode]
* Optional. 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
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* 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-NZ" 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.
* supported "yue-hk" voices.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down Expand Up @@ -417,7 +418,7 @@ export class TextToSpeechClient {
* @param {google.cloud.texttospeech.v1beta1.AudioConfig} request.audioConfig
* Required. The configuration of the synthesized audio.
* @param {number[]} request.enableTimePointing
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down

0 comments on commit c4c7ba8

Please sign in to comment.