The @google-cloud/speech package has the following named exports:
SpeechClient- Reference to v1.SpeechClientv1- This is used for selecting or pinning a particular backend service version. It exports:SpeechClient- Reference to v1.SpeechClient
v1p1beta1- This is used for selecting or pinning a beta backend service version. It exports:SpeechClient- Reference to v1p1beta1.SpeechClient
Examples
Install the client library with npm:
npm install --save @google-cloud/speech
Import the client library:
const speech = require('@google-cloud/speech');
Create a client that uses Application Default Credentials (ADC):
const client = new speech.SpeechClient();
Create a client with explicit credentials:
const client = new speech.SpeechClient({
projectId: 'your-project-id',
keyFilename: '/path/to/keyfile.json',
});
Members
(static) v1 :object
Properties:
| Name | Type | Description |
|---|---|---|
SpeechClient |
constructor |
Reference to v1.SpeechClient. |
(static) v1p1beta1 :object
Properties:
| Name | Type | Description |
|---|---|---|
SpeechClient |
constructor |
Reference to v1p1beta1.SpeechClient. |