Skip to content

Commit

Permalink
chore: update proto comments and fix tests (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Mar 13, 2019
1 parent 8645267 commit 81c5ad5
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 6 deletions.
24 changes: 23 additions & 1 deletion packages/google-cloud-speech/src/v1/speech_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down
24 changes: 23 additions & 1 deletion packages/google-cloud-speech/src/v1p1beta1/speech_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down
38 changes: 34 additions & 4 deletions packages/google-cloud-speech/synth.metadata
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
Expand Down

0 comments on commit 81c5ad5

Please sign in to comment.