1.0.20220808 • Published 3 years ago

@maxim_mazurok/gapi.client.texttospeech v1.0.20220808

Weekly downloads
72
License
MIT
Repository
github
Last release
3 years ago

TypeScript typings for Cloud Text-to-Speech API v1

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@v1 --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('texttospeech', 'v1', () => {
  // 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({  });
1.0.20220615

3 years ago

1.0.20220707

3 years ago

1.0.20220623

3 years ago

1.0.20220701

3 years ago

1.0.20220708

3 years ago

1.0.20220713

3 years ago

1.0.20220719

3 years ago

1.0.20220729

3 years ago

1.0.20220801

3 years ago

1.0.20220723

3 years ago

1.0.20220609

3 years ago

1.0.20220808

3 years ago

1.0.20220513

3 years ago

1.0.20220523

3 years ago

1.0.20220527

3 years ago

1.0.20220602

3 years ago

1.0.20220318

3 years ago

1.0.20220325

3 years ago

1.0.20220422

3 years ago

1.0.20220228

3 years ago

1.0.20220311

3 years ago

1.0.20220204

3 years ago

1.0.20220103

4 years ago

1.0.20220128

3 years ago

1.0.20211130

4 years ago

1.0.20211203

4 years ago

1.0.20211105

4 years ago

1.0.20211022

4 years ago

1.0.20211015

4 years ago

1.0.20210924

4 years ago

1.0.20210917

4 years ago

1.0.20210827

4 years ago

1.0.20210813

4 years ago

1.0.20210713

4 years ago

1.0.20210618

4 years ago

1.0.20210611

4 years ago

1.0.20210603

4 years ago

1.0.20210528

4 years ago

1.0.20210521

4 years ago

1.0.20210507

4 years ago

1.0.20210430

4 years ago

1.0.20210423

4 years ago

1.0.20210416

4 years ago

1.0.20210326

4 years ago

1.0.20210319

4 years ago

1.0.20210312

4 years ago

1.0.20210309

4 years ago

1.0.20210226

4 years ago

1.0.20210225

4 years ago

1.0.20210213

4 years ago

1.0.20210205

4 years ago

1.0.20210122

4 years ago

1.0.20210108

4 years ago

1.0.20201211

5 years ago

1.0.20201204

5 years ago

1.0.20201202

5 years ago

1.0.20201112

5 years ago

1.0.20201106

5 years ago