1.0.20220808 • Published 2 years ago

@maxim_mazurok/gapi.client.texttospeech v1.0.20220808

Weekly downloads
72
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.20220707

2 years ago

1.0.20220623

2 years ago

1.0.20220701

2 years ago

1.0.20220708

2 years ago

1.0.20220713

2 years ago

1.0.20220719

2 years ago

1.0.20220729

2 years ago

1.0.20220801

2 years ago

1.0.20220723

2 years ago

1.0.20220609

2 years ago

1.0.20220808

2 years ago

1.0.20220513

2 years ago

1.0.20220523

2 years ago

1.0.20220527

2 years ago

1.0.20220602

2 years ago

1.0.20220318

2 years ago

1.0.20220325

2 years ago

1.0.20220422

2 years ago

1.0.20220228

2 years ago

1.0.20220311

2 years ago

1.0.20220204

2 years ago

1.0.20220103

2 years ago

1.0.20220128

2 years ago

1.0.20211130

2 years ago

1.0.20211203

2 years ago

1.0.20211105

2 years ago

1.0.20211022

3 years ago

1.0.20211015

3 years ago

1.0.20210924

3 years ago

1.0.20210917

3 years ago

1.0.20210827

3 years ago

1.0.20210813

3 years ago

1.0.20210713

3 years ago

1.0.20210618

3 years ago

1.0.20210611

3 years ago

1.0.20210603

3 years ago

1.0.20210528

3 years ago

1.0.20210521

3 years ago

1.0.20210507

3 years ago

1.0.20210430

3 years ago

1.0.20210423

3 years ago

1.0.20210416

3 years ago

1.0.20210326

3 years ago

1.0.20210319

3 years ago

1.0.20210312

3 years ago

1.0.20210309

3 years ago

1.0.20210226

3 years ago

1.0.20210225

3 years ago

1.0.20210213

3 years ago

1.0.20210205

3 years ago

1.0.20210122

3 years ago

1.0.20210108

3 years ago

1.0.20201211

3 years ago

1.0.20201204

3 years ago

1.0.20201202

3 years ago

1.0.20201112

3 years ago

1.0.20201106

3 years ago