Skip to content

Commit

Permalink
Add v1beta1 version (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox authored Jul 12, 2018
1 parent 58e02d4 commit d332143
Show file tree
Hide file tree
Showing 13 changed files with 2,132 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/google-cloud-speech/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
google-cloud-logging-winston-*.tgz
google-cloud-logging-bunyan-*.tgz

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/google-cloud-speech/smoke-test/speech_smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ describe('SpeechSmokeTest', () => {
it('successfully makes a call to the service', done => {
const speech = require('../src');

var client = new speech.v1p1beta1.SpeechClient({
var client = new speech.v1beta1.SpeechClient({
// optional auth parameters.
});

var languageCode = 'en-US';
var sampleRateHertz = 44100;
var sampleRate = 44100;
var encoding = 'FLAC';
var config = {
languageCode: languageCode,
sampleRateHertz: sampleRateHertz,
sampleRate: sampleRate,
encoding: encoding,
};
var uri = 'gs://gapic-toolkit/hello.flac';
Expand All @@ -38,7 +38,7 @@ describe('SpeechSmokeTest', () => {
config: config,
audio: audio,
};
client.recognize(request)
client.syncRecognize(request)
.then(responses => {
var response = responses[0];
console.log(response);
Expand Down
7 changes: 7 additions & 0 deletions packages/google-cloud-speech/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const helpers = require('./helpers');
const gapic = Object.freeze({
v1: require('./v1'),
v1p1beta1: require('./v1p1beta1'),
v1beta1: require('./v1beta1'),
});

// Augment the SpeechClient objects with the helpers.
Expand Down Expand Up @@ -96,5 +97,11 @@ module.exports.v1 = gapic.v1;
*/
module.exports.v1p1beta1 = gapic.v1p1beta1;

/**
* @type {object}
* @property {constructor} SpeechClient Reference to {@link v1beta1.SpeechClient}.
*/
module.exports.v1beta1 = gapic.v1beta1;

// Alias `module.exports` as `module.exports.default`, for future-proofing.
module.exports.default = Object.assign({}, module.exports);
Loading

0 comments on commit d332143

Please sign in to comment.