From 81c5ad538bd140b6ca6ffcfcc907c566fa88ca13 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Wed, 13 Mar 2019 13:50:23 -0700 Subject: [PATCH] chore: update proto comments and fix tests (#316) --- .../src/v1/speech_client.js | 24 +++++++++++- .../src/v1p1beta1/speech_client.js | 24 +++++++++++- packages/google-cloud-speech/synth.metadata | 38 +++++++++++++++++-- 3 files changed, 80 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-speech/src/v1/speech_client.js b/packages/google-cloud-speech/src/v1/speech_client.js index c42da6c5173..b26e50d4677 100644 --- a/packages/google-cloud-speech/src/v1/speech_client.js +++ b/packages/google-cloud-speech/src/v1/speech_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./speech_client_config'); +const gapicConfig = require('./speech_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); @@ -402,6 +402,28 @@ class SpeechClient { * .catch(err => { * console.error(err); * }); + * + * const encoding = 'FLAC'; + * const sampleRateHertz = 44100; + * const languageCode = 'en-US'; + * const config = { + * encoding: encoding, + * sampleRateHertz: sampleRateHertz, + * languageCode: languageCode, + * }; + * const uri = 'gs://bucket_name/file_name.flac'; + * const audio = { + * uri: uri, + * }; + * const request = { + * config: config, + * audio: audio, + * }; + * + * // Handle the operation using the await pattern. + * const [operation] = await client.longRunningRecognize(request); + * + * const [response] = await operation.promise(); */ longRunningRecognize(request, options, callback) { if (options instanceof Function && callback === undefined) { diff --git a/packages/google-cloud-speech/src/v1p1beta1/speech_client.js b/packages/google-cloud-speech/src/v1p1beta1/speech_client.js index 47808fafc30..1e2eaf8e421 100644 --- a/packages/google-cloud-speech/src/v1p1beta1/speech_client.js +++ b/packages/google-cloud-speech/src/v1p1beta1/speech_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./speech_client_config'); +const gapicConfig = require('./speech_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); @@ -402,6 +402,28 @@ class SpeechClient { * .catch(err => { * console.error(err); * }); + * + * const encoding = 'FLAC'; + * const sampleRateHertz = 44100; + * const languageCode = 'en-US'; + * const config = { + * encoding: encoding, + * sampleRateHertz: sampleRateHertz, + * languageCode: languageCode, + * }; + * const uri = 'gs://bucket_name/file_name.flac'; + * const audio = { + * uri: uri, + * }; + * const request = { + * config: config, + * audio: audio, + * }; + * + * // Handle the operation using the await pattern. + * const [operation] = await client.longRunningRecognize(request); + * + * const [response] = await operation.promise(); */ longRunningRecognize(request, options, callback) { if (options instanceof Function && callback === undefined) { diff --git a/packages/google-cloud-speech/synth.metadata b/packages/google-cloud-speech/synth.metadata index dce792f9258..f74625dc82d 100644 --- a/packages/google-cloud-speech/synth.metadata +++ b/packages/google-cloud-speech/synth.metadata @@ -1,18 +1,48 @@ { - "updateTime": "2019-03-08T00:45:47.249442Z", + "updateTime": "2019-03-12T11:25:13.603843Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.16", + "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c986e1d9618ac41343962b353d136201d72626ae" + "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", + "internalRef": "237945492" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.2.26" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "speech", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/speech/artman_speech_v1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "speech", + "apiVersion": "v1p1beta1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/speech/artman_speech_v1p1beta1.yaml" } } ]