@googleapis/texttospeech 2.0.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -313,6 +313,10 @@ export namespace texttospeech_v1 {
313
313
  * Optional. The pronunciation customizations are applied to the input. If this is set, the input is synthesized using the given pronunciation customizations. The initial support is for en-us, with plans to expand to other locales in the future. Instant Clone voices aren't supported. In order to customize the pronunciation of a phrase, there must be an exact match of the phrase in the input types. If using SSML, the phrase must not be inside a phoneme tag.
314
314
  */
315
315
  customPronunciations?: Schema$CustomPronunciations;
316
+ /**
317
+ * Markup for HD voices specifically. This field may not be used with any other voices.
318
+ */
319
+ markup?: string | null;
316
320
  /**
317
321
  * The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.
318
322
  */
@@ -471,6 +475,56 @@ export namespace texttospeech_v1 {
471
475
 
472
476
  /**
473
477
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
478
+ * @example
479
+ * ```js
480
+ * // Before running the sample:
481
+ * // - Enable the API at:
482
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
483
+ * // - Login into gcloud by running:
484
+ * // ```sh
485
+ * // $ gcloud auth application-default login
486
+ * // ```
487
+ * // - Install the npm module by running:
488
+ * // ```sh
489
+ * // $ npm install googleapis
490
+ * // ```
491
+ *
492
+ * const {google} = require('googleapis');
493
+ * const texttospeech = google.texttospeech('v1');
494
+ *
495
+ * async function main() {
496
+ * const auth = new google.auth.GoogleAuth({
497
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
498
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
499
+ * });
500
+ *
501
+ * // Acquire an auth client, and bind it to all future calls
502
+ * const authClient = await auth.getClient();
503
+ * google.options({auth: authClient});
504
+ *
505
+ * // Do the magic
506
+ * const res = await texttospeech.operations.cancel({
507
+ * // The name of the operation resource to be cancelled.
508
+ * name: 'operations/.*',
509
+ *
510
+ * // Request body metadata
511
+ * requestBody: {
512
+ * // request body parameters
513
+ * // {}
514
+ * },
515
+ * });
516
+ * console.log(res.data);
517
+ *
518
+ * // Example response
519
+ * // {}
520
+ * }
521
+ *
522
+ * main().catch(e => {
523
+ * console.error(e);
524
+ * throw e;
525
+ * });
526
+ *
527
+ * ```
474
528
  *
475
529
  * @param params - Parameters for request
476
530
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -480,11 +534,11 @@ export namespace texttospeech_v1 {
480
534
  cancel(
481
535
  params: Params$Resource$Operations$Cancel,
482
536
  options: StreamMethodOptions
483
- ): GaxiosPromise<Readable>;
537
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
484
538
  cancel(
485
539
  params?: Params$Resource$Operations$Cancel,
486
540
  options?: MethodOptions
487
- ): GaxiosPromise<Schema$Empty>;
541
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
488
542
  cancel(
489
543
  params: Params$Resource$Operations$Cancel,
490
544
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -513,7 +567,10 @@ export namespace texttospeech_v1 {
513
567
  callback?:
514
568
  | BodyResponseCallback<Schema$Empty>
515
569
  | BodyResponseCallback<Readable>
516
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
570
+ ):
571
+ | void
572
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
573
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
517
574
  let params = (paramsOrCallback ||
518
575
  {}) as Params$Resource$Operations$Cancel;
519
576
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -556,6 +613,50 @@ export namespace texttospeech_v1 {
556
613
 
557
614
  /**
558
615
  * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
616
+ * @example
617
+ * ```js
618
+ * // Before running the sample:
619
+ * // - Enable the API at:
620
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
621
+ * // - Login into gcloud by running:
622
+ * // ```sh
623
+ * // $ gcloud auth application-default login
624
+ * // ```
625
+ * // - Install the npm module by running:
626
+ * // ```sh
627
+ * // $ npm install googleapis
628
+ * // ```
629
+ *
630
+ * const {google} = require('googleapis');
631
+ * const texttospeech = google.texttospeech('v1');
632
+ *
633
+ * async function main() {
634
+ * const auth = new google.auth.GoogleAuth({
635
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
636
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
637
+ * });
638
+ *
639
+ * // Acquire an auth client, and bind it to all future calls
640
+ * const authClient = await auth.getClient();
641
+ * google.options({auth: authClient});
642
+ *
643
+ * // Do the magic
644
+ * const res = await texttospeech.operations.delete({
645
+ * // The name of the operation resource to be deleted.
646
+ * name: 'operations/.*',
647
+ * });
648
+ * console.log(res.data);
649
+ *
650
+ * // Example response
651
+ * // {}
652
+ * }
653
+ *
654
+ * main().catch(e => {
655
+ * console.error(e);
656
+ * throw e;
657
+ * });
658
+ *
659
+ * ```
559
660
  *
560
661
  * @param params - Parameters for request
561
662
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -565,11 +666,11 @@ export namespace texttospeech_v1 {
565
666
  delete(
566
667
  params: Params$Resource$Operations$Delete,
567
668
  options: StreamMethodOptions
568
- ): GaxiosPromise<Readable>;
669
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
569
670
  delete(
570
671
  params?: Params$Resource$Operations$Delete,
571
672
  options?: MethodOptions
572
- ): GaxiosPromise<Schema$Empty>;
673
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
573
674
  delete(
574
675
  params: Params$Resource$Operations$Delete,
575
676
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -598,7 +699,10 @@ export namespace texttospeech_v1 {
598
699
  callback?:
599
700
  | BodyResponseCallback<Schema$Empty>
600
701
  | BodyResponseCallback<Readable>
601
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
702
+ ):
703
+ | void
704
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
705
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
602
706
  let params = (paramsOrCallback ||
603
707
  {}) as Params$Resource$Operations$Delete;
604
708
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -681,6 +785,67 @@ export namespace texttospeech_v1 {
681
785
 
682
786
  /**
683
787
  * Synthesizes long form text asynchronously.
788
+ * @example
789
+ * ```js
790
+ * // Before running the sample:
791
+ * // - Enable the API at:
792
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
793
+ * // - Login into gcloud by running:
794
+ * // ```sh
795
+ * // $ gcloud auth application-default login
796
+ * // ```
797
+ * // - Install the npm module by running:
798
+ * // ```sh
799
+ * // $ npm install googleapis
800
+ * // ```
801
+ *
802
+ * const {google} = require('googleapis');
803
+ * const texttospeech = google.texttospeech('v1');
804
+ *
805
+ * async function main() {
806
+ * const auth = new google.auth.GoogleAuth({
807
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
808
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
809
+ * });
810
+ *
811
+ * // Acquire an auth client, and bind it to all future calls
812
+ * const authClient = await auth.getClient();
813
+ * google.options({auth: authClient});
814
+ *
815
+ * // Do the magic
816
+ * const res = await texttospeech.projects.locations.synthesizeLongAudio({
817
+ * // The resource states of the request in the form of `projects/x/locations/x`.
818
+ * parent: 'projects/my-project/locations/my-location',
819
+ *
820
+ * // Request body metadata
821
+ * requestBody: {
822
+ * // request body parameters
823
+ * // {
824
+ * // "audioConfig": {},
825
+ * // "input": {},
826
+ * // "outputGcsUri": "my_outputGcsUri",
827
+ * // "voice": {}
828
+ * // }
829
+ * },
830
+ * });
831
+ * console.log(res.data);
832
+ *
833
+ * // Example response
834
+ * // {
835
+ * // "done": false,
836
+ * // "error": {},
837
+ * // "metadata": {},
838
+ * // "name": "my_name",
839
+ * // "response": {}
840
+ * // }
841
+ * }
842
+ *
843
+ * main().catch(e => {
844
+ * console.error(e);
845
+ * throw e;
846
+ * });
847
+ *
848
+ * ```
684
849
  *
685
850
  * @param params - Parameters for request
686
851
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -690,11 +855,11 @@ export namespace texttospeech_v1 {
690
855
  synthesizeLongAudio(
691
856
  params: Params$Resource$Projects$Locations$Synthesizelongaudio,
692
857
  options: StreamMethodOptions
693
- ): GaxiosPromise<Readable>;
858
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
694
859
  synthesizeLongAudio(
695
860
  params?: Params$Resource$Projects$Locations$Synthesizelongaudio,
696
861
  options?: MethodOptions
697
- ): GaxiosPromise<Schema$Operation>;
862
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
698
863
  synthesizeLongAudio(
699
864
  params: Params$Resource$Projects$Locations$Synthesizelongaudio,
700
865
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -723,7 +888,10 @@ export namespace texttospeech_v1 {
723
888
  callback?:
724
889
  | BodyResponseCallback<Schema$Operation>
725
890
  | BodyResponseCallback<Readable>
726
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
891
+ ):
892
+ | void
893
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
894
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
727
895
  let params = (paramsOrCallback ||
728
896
  {}) as Params$Resource$Projects$Locations$Synthesizelongaudio;
729
897
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -789,6 +957,56 @@ export namespace texttospeech_v1 {
789
957
 
790
958
  /**
791
959
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
960
+ * @example
961
+ * ```js
962
+ * // Before running the sample:
963
+ * // - Enable the API at:
964
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
965
+ * // - Login into gcloud by running:
966
+ * // ```sh
967
+ * // $ gcloud auth application-default login
968
+ * // ```
969
+ * // - Install the npm module by running:
970
+ * // ```sh
971
+ * // $ npm install googleapis
972
+ * // ```
973
+ *
974
+ * const {google} = require('googleapis');
975
+ * const texttospeech = google.texttospeech('v1');
976
+ *
977
+ * async function main() {
978
+ * const auth = new google.auth.GoogleAuth({
979
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
980
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
981
+ * });
982
+ *
983
+ * // Acquire an auth client, and bind it to all future calls
984
+ * const authClient = await auth.getClient();
985
+ * google.options({auth: authClient});
986
+ *
987
+ * // Do the magic
988
+ * const res = await texttospeech.projects.locations.operations.get({
989
+ * // The name of the operation resource.
990
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
991
+ * });
992
+ * console.log(res.data);
993
+ *
994
+ * // Example response
995
+ * // {
996
+ * // "done": false,
997
+ * // "error": {},
998
+ * // "metadata": {},
999
+ * // "name": "my_name",
1000
+ * // "response": {}
1001
+ * // }
1002
+ * }
1003
+ *
1004
+ * main().catch(e => {
1005
+ * console.error(e);
1006
+ * throw e;
1007
+ * });
1008
+ *
1009
+ * ```
792
1010
  *
793
1011
  * @param params - Parameters for request
794
1012
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -798,11 +1016,11 @@ export namespace texttospeech_v1 {
798
1016
  get(
799
1017
  params: Params$Resource$Projects$Locations$Operations$Get,
800
1018
  options: StreamMethodOptions
801
- ): GaxiosPromise<Readable>;
1019
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
802
1020
  get(
803
1021
  params?: Params$Resource$Projects$Locations$Operations$Get,
804
1022
  options?: MethodOptions
805
- ): GaxiosPromise<Schema$Operation>;
1023
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
806
1024
  get(
807
1025
  params: Params$Resource$Projects$Locations$Operations$Get,
808
1026
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -831,7 +1049,10 @@ export namespace texttospeech_v1 {
831
1049
  callback?:
832
1050
  | BodyResponseCallback<Schema$Operation>
833
1051
  | BodyResponseCallback<Readable>
834
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1052
+ ):
1053
+ | void
1054
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1055
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
835
1056
  let params = (paramsOrCallback ||
836
1057
  {}) as Params$Resource$Projects$Locations$Operations$Get;
837
1058
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -874,6 +1095,59 @@ export namespace texttospeech_v1 {
874
1095
 
875
1096
  /**
876
1097
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1098
+ * @example
1099
+ * ```js
1100
+ * // Before running the sample:
1101
+ * // - Enable the API at:
1102
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
1103
+ * // - Login into gcloud by running:
1104
+ * // ```sh
1105
+ * // $ gcloud auth application-default login
1106
+ * // ```
1107
+ * // - Install the npm module by running:
1108
+ * // ```sh
1109
+ * // $ npm install googleapis
1110
+ * // ```
1111
+ *
1112
+ * const {google} = require('googleapis');
1113
+ * const texttospeech = google.texttospeech('v1');
1114
+ *
1115
+ * async function main() {
1116
+ * const auth = new google.auth.GoogleAuth({
1117
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1118
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1119
+ * });
1120
+ *
1121
+ * // Acquire an auth client, and bind it to all future calls
1122
+ * const authClient = await auth.getClient();
1123
+ * google.options({auth: authClient});
1124
+ *
1125
+ * // Do the magic
1126
+ * const res = await texttospeech.projects.locations.operations.list({
1127
+ * // The standard list filter.
1128
+ * filter: 'placeholder-value',
1129
+ * // The name of the operation's parent resource.
1130
+ * name: 'projects/my-project/locations/my-location',
1131
+ * // The standard list page size.
1132
+ * pageSize: 'placeholder-value',
1133
+ * // The standard list page token.
1134
+ * pageToken: 'placeholder-value',
1135
+ * });
1136
+ * console.log(res.data);
1137
+ *
1138
+ * // Example response
1139
+ * // {
1140
+ * // "nextPageToken": "my_nextPageToken",
1141
+ * // "operations": []
1142
+ * // }
1143
+ * }
1144
+ *
1145
+ * main().catch(e => {
1146
+ * console.error(e);
1147
+ * throw e;
1148
+ * });
1149
+ *
1150
+ * ```
877
1151
  *
878
1152
  * @param params - Parameters for request
879
1153
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -883,11 +1157,11 @@ export namespace texttospeech_v1 {
883
1157
  list(
884
1158
  params: Params$Resource$Projects$Locations$Operations$List,
885
1159
  options: StreamMethodOptions
886
- ): GaxiosPromise<Readable>;
1160
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
887
1161
  list(
888
1162
  params?: Params$Resource$Projects$Locations$Operations$List,
889
1163
  options?: MethodOptions
890
- ): GaxiosPromise<Schema$ListOperationsResponse>;
1164
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
891
1165
  list(
892
1166
  params: Params$Resource$Projects$Locations$Operations$List,
893
1167
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -920,8 +1194,8 @@ export namespace texttospeech_v1 {
920
1194
  | BodyResponseCallback<Readable>
921
1195
  ):
922
1196
  | void
923
- | GaxiosPromise<Schema$ListOperationsResponse>
924
- | GaxiosPromise<Readable> {
1197
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
1198
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
925
1199
  let params = (paramsOrCallback ||
926
1200
  {}) as Params$Resource$Projects$Locations$Operations$List;
927
1201
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1001,6 +1275,60 @@ export namespace texttospeech_v1 {
1001
1275
 
1002
1276
  /**
1003
1277
  * Synthesizes speech synchronously: receive results after all text input has been processed.
1278
+ * @example
1279
+ * ```js
1280
+ * // Before running the sample:
1281
+ * // - Enable the API at:
1282
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
1283
+ * // - Login into gcloud by running:
1284
+ * // ```sh
1285
+ * // $ gcloud auth application-default login
1286
+ * // ```
1287
+ * // - Install the npm module by running:
1288
+ * // ```sh
1289
+ * // $ npm install googleapis
1290
+ * // ```
1291
+ *
1292
+ * const {google} = require('googleapis');
1293
+ * const texttospeech = google.texttospeech('v1');
1294
+ *
1295
+ * async function main() {
1296
+ * const auth = new google.auth.GoogleAuth({
1297
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1298
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1299
+ * });
1300
+ *
1301
+ * // Acquire an auth client, and bind it to all future calls
1302
+ * const authClient = await auth.getClient();
1303
+ * google.options({auth: authClient});
1304
+ *
1305
+ * // Do the magic
1306
+ * const res = await texttospeech.text.synthesize({
1307
+ * // Request body metadata
1308
+ * requestBody: {
1309
+ * // request body parameters
1310
+ * // {
1311
+ * // "advancedVoiceOptions": {},
1312
+ * // "audioConfig": {},
1313
+ * // "input": {},
1314
+ * // "voice": {}
1315
+ * // }
1316
+ * },
1317
+ * });
1318
+ * console.log(res.data);
1319
+ *
1320
+ * // Example response
1321
+ * // {
1322
+ * // "audioContent": "my_audioContent"
1323
+ * // }
1324
+ * }
1325
+ *
1326
+ * main().catch(e => {
1327
+ * console.error(e);
1328
+ * throw e;
1329
+ * });
1330
+ *
1331
+ * ```
1004
1332
  *
1005
1333
  * @param params - Parameters for request
1006
1334
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1010,11 +1338,11 @@ export namespace texttospeech_v1 {
1010
1338
  synthesize(
1011
1339
  params: Params$Resource$Text$Synthesize,
1012
1340
  options: StreamMethodOptions
1013
- ): GaxiosPromise<Readable>;
1341
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1014
1342
  synthesize(
1015
1343
  params?: Params$Resource$Text$Synthesize,
1016
1344
  options?: MethodOptions
1017
- ): GaxiosPromise<Schema$SynthesizeSpeechResponse>;
1345
+ ): Promise<GaxiosResponseWithHTTP2<Schema$SynthesizeSpeechResponse>>;
1018
1346
  synthesize(
1019
1347
  params: Params$Resource$Text$Synthesize,
1020
1348
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1049,8 +1377,8 @@ export namespace texttospeech_v1 {
1049
1377
  | BodyResponseCallback<Readable>
1050
1378
  ):
1051
1379
  | void
1052
- | GaxiosPromise<Schema$SynthesizeSpeechResponse>
1053
- | GaxiosPromise<Readable> {
1380
+ | Promise<GaxiosResponseWithHTTP2<Schema$SynthesizeSpeechResponse>>
1381
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1054
1382
  let params = (paramsOrCallback || {}) as Params$Resource$Text$Synthesize;
1055
1383
  let options = (optionsOrCallback || {}) as MethodOptions;
1056
1384
 
@@ -1109,6 +1437,52 @@ export namespace texttospeech_v1 {
1109
1437
 
1110
1438
  /**
1111
1439
  * Returns a list of Voice supported for synthesis.
1440
+ * @example
1441
+ * ```js
1442
+ * // Before running the sample:
1443
+ * // - Enable the API at:
1444
+ * // https://console.developers.google.com/apis/api/texttospeech.googleapis.com
1445
+ * // - Login into gcloud by running:
1446
+ * // ```sh
1447
+ * // $ gcloud auth application-default login
1448
+ * // ```
1449
+ * // - Install the npm module by running:
1450
+ * // ```sh
1451
+ * // $ npm install googleapis
1452
+ * // ```
1453
+ *
1454
+ * const {google} = require('googleapis');
1455
+ * const texttospeech = google.texttospeech('v1');
1456
+ *
1457
+ * async function main() {
1458
+ * const auth = new google.auth.GoogleAuth({
1459
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1460
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1461
+ * });
1462
+ *
1463
+ * // Acquire an auth client, and bind it to all future calls
1464
+ * const authClient = await auth.getClient();
1465
+ * google.options({auth: authClient});
1466
+ *
1467
+ * // Do the magic
1468
+ * const res = await texttospeech.voices.list({
1469
+ * // Optional. Recommended. [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. For example, if you specify `"en-NZ"`, all `"en-NZ"` voices will be returned. If you specify `"no"`, both `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be returned.
1470
+ * languageCode: 'placeholder-value',
1471
+ * });
1472
+ * console.log(res.data);
1473
+ *
1474
+ * // Example response
1475
+ * // {
1476
+ * // "voices": []
1477
+ * // }
1478
+ * }
1479
+ *
1480
+ * main().catch(e => {
1481
+ * console.error(e);
1482
+ * throw e;
1483
+ * });
1484
+ *
1485
+ * ```
1112
1486
  *
1113
1487
  * @param params - Parameters for request
1114
1488
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1118,11 +1492,11 @@ export namespace texttospeech_v1 {
1118
1492
  list(
1119
1493
  params: Params$Resource$Voices$List,
1120
1494
  options: StreamMethodOptions
1121
- ): GaxiosPromise<Readable>;
1495
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1122
1496
  list(
1123
1497
  params?: Params$Resource$Voices$List,
1124
1498
  options?: MethodOptions
1125
- ): GaxiosPromise<Schema$ListVoicesResponse>;
1499
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListVoicesResponse>>;
1126
1500
  list(
1127
1501
  params: Params$Resource$Voices$List,
1128
1502
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1153,8 +1527,8 @@ export namespace texttospeech_v1 {
1153
1527
  | BodyResponseCallback<Readable>
1154
1528
  ):
1155
1529
  | void
1156
- | GaxiosPromise<Schema$ListVoicesResponse>
1157
- | GaxiosPromise<Readable> {
1530
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListVoicesResponse>>
1531
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1158
1532
  let params = (paramsOrCallback || {}) as Params$Resource$Voices$List;
1159
1533
  let options = (optionsOrCallback || {}) as MethodOptions;
1160
1534