Socket
Socket
Sign inDemoInstall

@google-cloud/speech

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/speech - npm Package Compare versions

Comparing version 4.10.2 to 5.0.1

build/protos/google/cloud/speech/v1/cloud_speech_adaptation.proto

5

build/src/index.d.ts

@@ -5,3 +5,5 @@ import * as v1p1beta1 from './v1p1beta1';

declare type SpeechClient = v1.SpeechClient;
export { v1, v1p1beta1, SpeechClient };
declare const AdaptationClient: typeof v1.AdaptationClient;
declare type AdaptationClient = v1.AdaptationClient;
export { v1, v1p1beta1, SpeechClient, AdaptationClient };
declare const _default: {

@@ -11,2 +13,3 @@ v1: typeof v1;

SpeechClient: typeof v1.SpeechClient;
AdaptationClient: typeof v1.AdaptationClient;
};

@@ -13,0 +16,0 @@ export default _default;

6

build/src/index.js

@@ -16,3 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.protos = exports.SpeechClient = exports.v1p1beta1 = exports.v1 = void 0;
exports.protos = exports.AdaptationClient = exports.SpeechClient = exports.v1p1beta1 = exports.v1 = void 0;
const helpers_1 = require("./helpers");

@@ -29,7 +29,9 @@ const v1p1beta1 = require("./v1p1beta1");

exports.SpeechClient = SpeechClient;
const AdaptationClient = v1.AdaptationClient;
exports.AdaptationClient = AdaptationClient;
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
exports.default = { v1, v1p1beta1, SpeechClient };
exports.default = { v1, v1p1beta1, SpeechClient, AdaptationClient };
const protos = require("../protos/protos");
exports.protos = protos;
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

export { AdaptationClient } from './adaptation_client';
export { SpeechClient } from './speech_client';

@@ -20,4 +20,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SpeechClient = exports.AdaptationClient = void 0;
var adaptation_client_1 = require("./adaptation_client");
Object.defineProperty(exports, "AdaptationClient", { enumerable: true, get: function () { return adaptation_client_1.AdaptationClient; } });
var speech_client_1 = require("./speech_client");
Object.defineProperty(exports, "SpeechClient", { enumerable: true, get: function () { return speech_client_1.SpeechClient; } });
//# sourceMappingURL=index.js.map

@@ -35,3 +35,3 @@ import * as gax from 'google-gax';

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -59,7 +59,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -126,3 +125,7 @@ constructor(opts?: ClientOptions);

*/
recognize(request?: protos.google.cloud.speech.v1.IRecognizeRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | undefined, {} | undefined]>;
recognize(request?: protos.google.cloud.speech.v1.IRecognizeRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1.IRecognizeResponse,
protos.google.cloud.speech.v1.IRecognizeRequest | undefined,
{} | undefined
]>;
recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | null | undefined, {} | null | undefined>): void;

@@ -176,3 +179,7 @@ recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, callback: Callback<protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | null | undefined, {} | null | undefined>): void;

*/
longRunningRecognize(request?: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
longRunningRecognize(request?: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -179,0 +186,0 @@ longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, callback: Callback<LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -45,3 +45,3 @@ "use strict";

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -69,7 +69,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -142,3 +141,3 @@ constructor(opts) {

this.descriptors.stream = {
streamingRecognize: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
streamingRecognize: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING, opts.fallback === 'rest'),
};

@@ -149,7 +148,21 @@ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);

// rather than holding a request open.
this.operationsClient = this._gaxModule
.lro({
const lroOptions = {
auth: this.auth,
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
})
};
if (opts.fallback === 'rest') {
lroOptions.protoJson = protoFilesRoot;
lroOptions.httpRules = [
{
selector: 'google.longrunning.Operations.GetOperation',
get: '/v1/operations/{name=**}',
},
{
selector: 'google.longrunning.Operations.ListOperations',
get: '/v1/operations',
},
];
}
this.operationsClient = this._gaxModule
.lro(lroOptions)
.operationsClient(opts);

@@ -219,3 +232,3 @@ const longRunningRecognizeResponse = protoFilesRoot.lookup('.google.cloud.speech.v1.LongRunningRecognizeResponse');

undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -333,3 +346,3 @@ }

const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.longRunningRecognize, gax.createDefaultBackoffSettings());
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.longRunningRecognize, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -336,0 +349,0 @@ }

@@ -36,3 +36,3 @@ /// <reference types="node" />

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -60,7 +60,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -114,4 +113,3 @@ constructor(opts?: ClientOptions);

* @param {string} request.parent
* Required. The parent resource where this phrase set will be created.
* Format:
* Required. The parent resource where this phrase set will be created. Format:
*

@@ -129,4 +127,4 @@ * `projects/{project}/locations/{location}/phraseSets`

*
* This value should be 4-63 characters, and valid characters
* are /{@link 0-9|a-z}-/.
* This value should restrict to letters, numbers, and hyphens, with the first
* character a letter, the last a letter or a number, and be 4-63 characters.
* @param {google.cloud.speech.v1p1beta1.PhraseSet} request.phraseSet

@@ -144,3 +142,7 @@ * Required. The phrase set to create.

*/
createPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest | undefined, {} | undefined]>;
createPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.IPhraseSet,
protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest | undefined,
{} | undefined
]>;
createPhraseSet(request: protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest | null | undefined, {} | null | undefined>): void;

@@ -173,3 +175,7 @@ createPhraseSet(request: protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.ICreatePhraseSetRequest | null | undefined, {} | null | undefined>): void;

*/
getPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest | undefined, {} | undefined]>;
getPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.IPhraseSet,
protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest | undefined,
{} | undefined
]>;
getPhraseSet(request: protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest | null | undefined, {} | null | undefined>): void;

@@ -207,3 +213,7 @@ getPhraseSet(request: protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IGetPhraseSetRequest | null | undefined, {} | null | undefined>): void;

*/
updatePhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest | undefined, {} | undefined]>;
updatePhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.IPhraseSet,
protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest | undefined,
{} | undefined
]>;
updatePhraseSet(request: protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest | null | undefined, {} | null | undefined>): void;

@@ -230,3 +240,7 @@ updatePhraseSet(request: protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.IPhraseSet, protos.google.cloud.speech.v1p1beta1.IUpdatePhraseSetRequest | null | undefined, {} | null | undefined>): void;

*/
deletePhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest | undefined, {} | undefined]>;
deletePhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest | undefined,
{} | undefined
]>;
deletePhraseSet(request: protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest | null | undefined, {} | null | undefined>): void;

@@ -240,4 +254,3 @@ deletePhraseSet(request: protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.speech.v1p1beta1.IDeletePhraseSetRequest | null | undefined, {} | null | undefined>): void;

* @param {string} request.parent
* Required. The parent resource where this custom class will be created.
* Format:
* Required. The parent resource where this custom class will be created. Format:
*

@@ -255,4 +268,4 @@ * `projects/{project}/locations/{location}/customClasses`

*
* This value should be 4-63 characters, and valid characters
* are /{@link 0-9|a-z}-/.
* This value should restrict to letters, numbers, and hyphens, with the first
* character a letter, the last a letter or a number, and be 4-63 characters.
* @param {google.cloud.speech.v1p1beta1.CustomClass} request.customClass

@@ -270,3 +283,7 @@ * Required. The custom class to create.

*/
createCustomClass(request?: protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.ICustomClass, (protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest | undefined), {} | undefined]>;
createCustomClass(request?: protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.ICustomClass,
(protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest | undefined),
{} | undefined
]>;
createCustomClass(request: protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest | null | undefined, {} | null | undefined>): void;

@@ -293,3 +310,7 @@ createCustomClass(request: protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.ICreateCustomClassRequest | null | undefined, {} | null | undefined>): void;

*/
getCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest | undefined, {} | undefined]>;
getCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.ICustomClass,
protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest | undefined,
{} | undefined
]>;
getCustomClass(request: protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest | null | undefined, {} | null | undefined>): void;

@@ -327,3 +348,7 @@ getCustomClass(request: protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.IGetCustomClassRequest | null | undefined, {} | null | undefined>): void;

*/
updateCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.ICustomClass, (protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest | undefined), {} | undefined]>;
updateCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.ICustomClass,
(protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest | undefined),
{} | undefined
]>;
updateCustomClass(request: protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest | null | undefined, {} | null | undefined>): void;

@@ -356,3 +381,7 @@ updateCustomClass(request: protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.ICustomClass, protos.google.cloud.speech.v1p1beta1.IUpdateCustomClassRequest | null | undefined, {} | null | undefined>): void;

*/
deleteCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest | undefined), {} | undefined]>;
deleteCustomClass(request?: protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest | undefined),
{} | undefined
]>;
deleteCustomClass(request: protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest | null | undefined, {} | null | undefined>): void;

@@ -399,3 +428,7 @@ deleteCustomClass(request: protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.speech.v1p1beta1.IDeleteCustomClassRequest | null | undefined, {} | null | undefined>): void;

*/
listPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.IPhraseSet[], protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest | null, protos.google.cloud.speech.v1p1beta1.IListPhraseSetResponse]>;
listPhraseSet(request?: protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.IPhraseSet[],
protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest | null,
protos.google.cloud.speech.v1p1beta1.IListPhraseSetResponse
]>;
listPhraseSet(request: protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, protos.google.cloud.speech.v1p1beta1.IListPhraseSetResponse | null | undefined, protos.google.cloud.speech.v1p1beta1.IPhraseSet>): void;

@@ -521,3 +554,7 @@ listPhraseSet(request: protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, callback: PaginationCallback<protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, protos.google.cloud.speech.v1p1beta1.IListPhraseSetResponse | null | undefined, protos.google.cloud.speech.v1p1beta1.IPhraseSet>): void;

*/
listCustomClasses(request?: protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.ICustomClass[], protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest | null, protos.google.cloud.speech.v1p1beta1.IListCustomClassesResponse]>;
listCustomClasses(request?: protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.ICustomClass[],
protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest | null,
protos.google.cloud.speech.v1p1beta1.IListCustomClassesResponse
]>;
listCustomClasses(request: protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, protos.google.cloud.speech.v1p1beta1.IListCustomClassesResponse | null | undefined, protos.google.cloud.speech.v1p1beta1.ICustomClass>): void;

@@ -524,0 +561,0 @@ listCustomClasses(request: protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, callback: PaginationCallback<protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, protos.google.cloud.speech.v1p1beta1.IListCustomClassesResponse | null | undefined, protos.google.cloud.speech.v1p1beta1.ICustomClass>): void;

@@ -42,3 +42,3 @@ "use strict";

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -66,7 +66,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -201,3 +200,3 @@ constructor(opts) {

const descriptor = this.descriptors.page[methodName] || undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -204,0 +203,0 @@ }

@@ -20,2 +20,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SpeechClient = exports.AdaptationClient = void 0;
var adaptation_client_1 = require("./adaptation_client");

@@ -22,0 +23,0 @@ Object.defineProperty(exports, "AdaptationClient", { enumerable: true, get: function () { return adaptation_client_1.AdaptationClient; } });

@@ -35,3 +35,3 @@ import * as gax from 'google-gax';

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -59,7 +59,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -126,3 +125,7 @@ constructor(opts?: ClientOptions);

*/
recognize(request?: protos.google.cloud.speech.v1p1beta1.IRecognizeRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1p1beta1.IRecognizeResponse, protos.google.cloud.speech.v1p1beta1.IRecognizeRequest | undefined, {} | undefined]>;
recognize(request?: protos.google.cloud.speech.v1p1beta1.IRecognizeRequest, options?: CallOptions): Promise<[
protos.google.cloud.speech.v1p1beta1.IRecognizeResponse,
protos.google.cloud.speech.v1p1beta1.IRecognizeRequest | undefined,
{} | undefined
]>;
recognize(request: protos.google.cloud.speech.v1p1beta1.IRecognizeRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.IRecognizeResponse, protos.google.cloud.speech.v1p1beta1.IRecognizeRequest | null | undefined, {} | null | undefined>): void;

@@ -176,3 +179,7 @@ recognize(request: protos.google.cloud.speech.v1p1beta1.IRecognizeRequest, callback: Callback<protos.google.cloud.speech.v1p1beta1.IRecognizeResponse, protos.google.cloud.speech.v1p1beta1.IRecognizeRequest | null | undefined, {} | null | undefined>): void;

*/
longRunningRecognize(request?: protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
longRunningRecognize(request?: protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
longRunningRecognize(request: protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -179,0 +186,0 @@ longRunningRecognize(request: protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest, callback: Callback<LROperation<protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -45,3 +45,3 @@ "use strict";

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -69,7 +69,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -142,3 +141,3 @@ constructor(opts) {

this.descriptors.stream = {
streamingRecognize: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
streamingRecognize: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING, opts.fallback === 'rest'),
};

@@ -149,7 +148,21 @@ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);

// rather than holding a request open.
this.operationsClient = this._gaxModule
.lro({
const lroOptions = {
auth: this.auth,
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
})
};
if (opts.fallback === 'rest') {
lroOptions.protoJson = protoFilesRoot;
lroOptions.httpRules = [
{
selector: 'google.longrunning.Operations.GetOperation',
get: '/v1p1beta1/operations/{name=**}',
},
{
selector: 'google.longrunning.Operations.ListOperations',
get: '/v1p1beta1/operations',
},
];
}
this.operationsClient = this._gaxModule
.lro(lroOptions)
.operationsClient(opts);

@@ -219,3 +232,3 @@ const longRunningRecognizeResponse = protoFilesRoot.lookup('.google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse');

undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -333,3 +346,3 @@ }

const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.longRunningRecognize, gax.createDefaultBackoffSettings());
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.longRunningRecognize, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -336,0 +349,0 @@ }

@@ -7,2 +7,27 @@ # Changelog

## [5.0.1](https://github.com/googleapis/nodejs-speech/compare/v5.0.0...v5.0.1) (2022-08-23)
### Bug Fixes
* better support for fallback mode ([#918](https://github.com/googleapis/nodejs-speech/issues/918)) ([7cf922a](https://github.com/googleapis/nodejs-speech/commit/7cf922a2e13ccd9432aa9ca801e2bf5b7d0fa6ff))
* change import long to require ([#920](https://github.com/googleapis/nodejs-speech/issues/920)) ([375a9b0](https://github.com/googleapis/nodejs-speech/commit/375a9b0abe8bb224b4da8bf82da28b6205c1c817))
* **deps:** do not depend on protobufjs; bump dep in samples ([#911](https://github.com/googleapis/nodejs-speech/issues/911)) ([02c3fb7](https://github.com/googleapis/nodejs-speech/commit/02c3fb74f1229162401922fad143852a12338fe6))
* **deps:** update dependency @google-cloud/common to v4 ([#896](https://github.com/googleapis/nodejs-speech/issues/896)) ([3bdda3f](https://github.com/googleapis/nodejs-speech/commit/3bdda3fff9733dbd0236d4ba36a6cbe1ec0449c5))
* **deps:** update dependency @google-cloud/storage to v6 ([#893](https://github.com/googleapis/nodejs-speech/issues/893)) ([738c538](https://github.com/googleapis/nodejs-speech/commit/738c5380e15c3bbe4c05def4b42cfbbb8c366263))
* **deps:** update dependency google-proto-files to v3 ([#900](https://github.com/googleapis/nodejs-speech/issues/900)) ([557a2f0](https://github.com/googleapis/nodejs-speech/commit/557a2f0527a29bb2668e7a499156f2c0a4e6148c))
* **deps:** update dependency proto3-json-serializer to v1 ([#890](https://github.com/googleapis/nodejs-speech/issues/890)) ([697ca5c](https://github.com/googleapis/nodejs-speech/commit/697ca5c70c5f09967a7a93203208d090f3edf33d))
* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-speech/issues/1546)) ([#922](https://github.com/googleapis/nodejs-speech/issues/922)) ([8699490](https://github.com/googleapis/nodejs-speech/commit/8699490a782c1ab532eda6b9596ddf2e0810cfff))
## [5.0.0](https://github.com/googleapis/nodejs-speech/compare/v4.10.2...v5.0.0) (2022-06-24)
### ⚠ BREAKING CHANGES
* update library to use Node 12 (#891)
### Build System
* update library to use Node 12 ([#891](https://github.com/googleapis/nodejs-speech/issues/891)) ([73a2f72](https://github.com/googleapis/nodejs-speech/commit/73a2f7223274d75be929ed074083970425bd3997))
### [4.10.2](https://github.com/googleapis/nodejs-speech/compare/v4.10.1...v4.10.2) (2022-05-02)

@@ -9,0 +34,0 @@

{
"name": "@google-cloud/speech",
"description": "Cloud Speech Client Library for Node.js",
"version": "4.10.2",
"version": "5.0.1",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
"node": ">=10"
"node": ">=12.0.0"
},

@@ -49,6 +49,5 @@ "repository": "googleapis/nodejs-speech",

"dependencies": {
"@google-cloud/common": "^3.0.0",
"@google-cloud/common": "^4.0.0",
"@types/pumpify": "^1.4.1",
"google-gax": "^2.30.1",
"protobufjs": "^6.8.6",
"google-gax": "^3.1.2",
"pumpify": "^2.0.0",

@@ -59,3 +58,3 @@ "stream-events": "^1.0.4",

"devDependencies": {
"@types/mocha": "^8.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",

@@ -65,13 +64,13 @@ "@types/sinon": "^10.0.0",

"codecov": "^3.0.2",
"gts": "^3.0.0",
"gts": "^3.1.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^2.0.0",
"mocha": "^8.0.0",
"jsdoc-fresh": "^2.0.0",
"jsdoc-region-tag": "^2.0.0",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",
"null-loader": "^4.0.0",
"pack-n-play": "^1.0.0-2",
"sinon": "^13.0.0",
"sinon": "^14.0.0",
"ts-loader": "^8.0.0",
"typescript": "^3.8.3",
"typescript": "^4.6.4",
"webpack": "^5.0.0",

@@ -78,0 +77,0 @@ "webpack-cli": "^4.0.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc