@google-cloud/speech
Advanced tools
Comparing version 4.1.4 to 4.1.5
import * as gax from 'google-gax'; | ||
import { Callback, Descriptors, ClientOptions, LROperation } from 'google-gax'; | ||
import { Callback, CallOptions, Descriptors, ClientOptions, LROperation } from 'google-gax'; | ||
import * as protos from '../../protos/protos'; | ||
@@ -51,5 +51,5 @@ /** | ||
* API remote host. | ||
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override. | ||
* TODO(@alexander-fenster): link to gax documentation. | ||
* @param {boolean} fallback - Use HTTP fallback mode. | ||
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. | ||
* 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 | ||
@@ -99,4 +99,4 @@ * instead of gRPC transport. In browser context (if the `window` object is defined) | ||
getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, options?: gax.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: gax.CallOptions, callback: Callback<protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | null | undefined, {} | null | undefined>): void; | ||
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; | ||
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; | ||
@@ -123,5 +123,5 @@ /** | ||
*/ | ||
_streamingRecognize(options?: gax.CallOptions): gax.CancellableStream; | ||
longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options?: gax.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: gax.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; | ||
_streamingRecognize(options?: CallOptions): gax.CancellableStream; | ||
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; | ||
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; | ||
@@ -128,0 +128,0 @@ /** |
@@ -21,4 +21,10 @@ "use strict"; | ||
exports.SpeechClient = void 0; | ||
/* global window */ | ||
const gax = require("google-gax"); | ||
const path = require("path"); | ||
/** | ||
* Client JSON configuration object, loaded from | ||
* `src/v1/speech_client_config.json`. | ||
* This file defines retry strategy and timeouts for all API methods in this library. | ||
*/ | ||
const gapicConfig = require("./speech_client_config.json"); | ||
@@ -59,5 +65,5 @@ const google_gax_1 = require("google-gax"); | ||
* API remote host. | ||
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override. | ||
* TODO(@alexander-fenster): link to gax documentation. | ||
* @param {boolean} fallback - Use HTTP fallback mode. | ||
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. | ||
* 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 | ||
@@ -82,3 +88,3 @@ * instead of gRPC transport. In browser context (if the `window` object is defined) | ||
const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {}; | ||
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : typeof window !== 'undefined'; | ||
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function'); | ||
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); | ||
@@ -85,0 +91,0 @@ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. |
import * as gax from 'google-gax'; | ||
import { Callback, Descriptors, ClientOptions, LROperation } from 'google-gax'; | ||
import { Callback, CallOptions, Descriptors, ClientOptions, LROperation } from 'google-gax'; | ||
import * as protos from '../../protos/protos'; | ||
@@ -54,5 +54,5 @@ /** | ||
* API remote host. | ||
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override. | ||
* TODO(@alexander-fenster): link to gax documentation. | ||
* @param {boolean} fallback - Use HTTP fallback mode. | ||
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. | ||
* 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 | ||
@@ -102,4 +102,4 @@ * instead of gRPC transport. In browser context (if the `window` object is defined) | ||
getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
recognize(request: protos.google.cloud.speech.v1p1beta1.IRecognizeRequest, options?: gax.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: gax.CallOptions, callback: Callback<protos.google.cloud.speech.v1p1beta1.IRecognizeResponse, protos.google.cloud.speech.v1p1beta1.IRecognizeRequest | null | undefined, {} | null | undefined>): void; | ||
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; | ||
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; | ||
@@ -126,5 +126,5 @@ /** | ||
*/ | ||
_streamingRecognize(options?: gax.CallOptions): gax.CancellableStream; | ||
longRunningRecognize(request: protos.google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest, options?: gax.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: gax.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; | ||
_streamingRecognize(options?: CallOptions): gax.CancellableStream; | ||
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; | ||
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; | ||
@@ -131,0 +131,0 @@ /** |
@@ -21,4 +21,10 @@ "use strict"; | ||
exports.SpeechClient = void 0; | ||
/* global window */ | ||
const gax = require("google-gax"); | ||
const path = require("path"); | ||
/** | ||
* Client JSON configuration object, loaded from | ||
* `src/v1p1beta1/speech_client_config.json`. | ||
* This file defines retry strategy and timeouts for all API methods in this library. | ||
*/ | ||
const gapicConfig = require("./speech_client_config.json"); | ||
@@ -59,5 +65,5 @@ const google_gax_1 = require("google-gax"); | ||
* API remote host. | ||
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override. | ||
* TODO(@alexander-fenster): link to gax documentation. | ||
* @param {boolean} fallback - Use HTTP fallback mode. | ||
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. | ||
* 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 | ||
@@ -82,3 +88,3 @@ * instead of gRPC transport. In browser context (if the `window` object is defined) | ||
const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {}; | ||
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : typeof window !== 'undefined'; | ||
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function'); | ||
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); | ||
@@ -85,0 +91,0 @@ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. |
@@ -7,2 +7,9 @@ # Changelog | ||
### [4.1.5](https://www.github.com/googleapis/nodejs-speech/compare/v4.1.4...v4.1.5) (2020-12-02) | ||
### Bug Fixes | ||
* **browser:** check for fetch on window ([6378dc1](https://www.github.com/googleapis/nodejs-speech/commit/6378dc193da2f792645ed0ec221c9a3495264486)) | ||
### [4.1.4](https://www.github.com/googleapis/nodejs-speech/compare/v4.1.3...v4.1.4) (2020-11-06) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/speech", | ||
"description": "Cloud Speech Client Library for Node.js", | ||
"version": "4.1.4", | ||
"version": "4.1.5", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
@@ -112,2 +112,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
| Infinite Streaming | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/infiniteStreaming.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/infiniteStreaming.js,samples/README.md) | | ||
| Profanity Filter | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/profanityFilter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/profanityFilter.js,samples/README.md) | | ||
| Quickstart | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | ||
@@ -129,3 +130,3 @@ | Recognize | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/recognize.js,samples/README.md) | | ||
Client libraries targetting some end-of-life versions of Node.js are available, and | ||
Client libraries targeting some end-of-life versions of Node.js are available, and | ||
can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
@@ -132,0 +133,0 @@ The dist-tags follow the naming convention `legacy-(version)`. |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2498657
35036
186