0.0.20241026 • Published 11 months ago

@maxim_mazurok/gapi.client.texttospeech-v1beta1 v0.0.20241026

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

TypeScript typings for Cloud Text-to-Speech API v1beta1

Synthesizes natural-sounding speech by applying powerful neural network models. For detailed description please check documentation.

Installing

Install typings for Cloud Text-to-Speech API:

npm install @types/gapi.client.texttospeech-v1beta1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://texttospeech.googleapis.com/$discovery/rest?version=v1beta1',
  () => {
    // now we can use:
    // gapi.client.texttospeech
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('texttospeech', 'v1beta1', () => {
  // now we can use:
  // gapi.client.texttospeech
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Cloud Text-to-Speech API resources:

/*
Synthesizes speech synchronously: receive results after all text input has been processed.
*/
await gapi.client.texttospeech.text.synthesize({});

/*
Returns a list of Voice supported for synthesis.
*/
await gapi.client.texttospeech.voices.list({});
0.0.20241026

11 months ago

0.0.20241017

11 months ago

0.0.20240925

12 months ago

0.0.20240923

12 months ago

0.0.20241004

11 months ago

0.0.20241003

11 months ago

0.0.20241001

12 months ago

0.0.20241013

11 months ago

0.0.20241008

11 months ago

0.0.20240917

12 months ago

0.0.20240910

1 year ago

0.0.20240913

12 months ago

0.0.20240530

1 year ago

0.0.20240806

1 year ago

0.0.20240525

1 year ago

0.0.20240722

1 year ago

0.0.20240815

1 year ago

0.0.20240730

1 year ago

0.0.20240826

1 year ago

0.0.20240704

1 year ago

0.0.20240716

1 year ago

0.0.20240516

1 year ago

0.0.20240509

1 year ago

0.0.20240502

1 year ago

0.0.20240425

1 year ago

0.0.20240419

1 year ago

0.0.20240327

1 year ago

0.0.20240313

1 year ago

0.0.20240307

2 years ago

0.0.20240228

2 years ago

0.0.20240222

2 years ago

0.0.20240221

2 years ago

0.0.20240207

2 years ago

0.0.20240118

2 years ago

0.0.20240109

2 years ago

0.0.20231207

2 years ago

0.0.20231130

2 years ago

0.0.20230818

2 years ago

0.0.20230731

2 years ago

0.0.20231113

2 years ago

0.0.20230808

2 years ago

0.0.20230921

2 years ago

0.0.20230803

2 years ago

0.0.20231023

2 years ago

0.0.20231102

2 years ago

0.0.20231026

2 years ago

0.0.20230718

2 years ago

0.0.20230713

2 years ago

0.0.20231011

2 years ago

0.0.20231013

2 years ago

0.0.20230907

2 years ago

0.0.20230824

2 years ago

0.0.20230703

2 years ago

0.0.20230626

2 years ago

0.0.20230518

2 years ago

0.0.20230614

2 years ago

0.0.20230515

2 years ago

0.0.20230615

2 years ago

0.0.20230622

2 years ago

0.0.20230504

2 years ago

0.0.20230427

2 years ago

0.0.20230530

2 years ago

0.0.20230414

2 years ago

0.0.20230315

2 years ago

0.0.20230420

2 years ago

0.0.20230403

2 years ago

0.0.20230327

2 years ago

0.0.20230228

3 years ago

0.0.20230309

3 years ago

0.0.20230306

3 years ago

0.0.20230221

3 years ago

0.0.20230203

3 years ago

0.0.20230126

3 years ago

0.0.20230118

3 years ago

0.0.20221213

3 years ago

0.0.20221202

3 years ago

0.0.20230105

3 years ago

0.0.20221201

3 years ago

0.0.20221219

3 years ago

0.0.20221109

3 years ago

0.0.20230103

3 years ago

0.0.20221128

3 years ago

0.0.20221020

3 years ago

0.0.20221027

3 years ago

0.0.20220906

3 years ago

0.0.20220819

3 years ago

0.0.20220908

3 years ago

0.0.20220830

3 years ago

0.0.20220922

3 years ago

0.0.20220824

3 years ago

0.0.20220826

3 years ago

0.0.20220915

3 years ago

0.0.20220816

3 years ago

0.0.20220808

3 years ago