-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Speech client use autogen layer #1631
Conversation
// @jmuk Is it possible to update gax-nodejs to expect camelcase args instead of snake? JS convention is generally camelcase. These are the options we had to provide to grpc to enable this: https://github.com/GoogleCloudPlatform/google-cloud-node/blob/95881d2a83904be5f2e4ebc24ee93369db212ac4/packages/common/src/grpc-service.js#L755 |
@@ -87,6 +88,7 @@ function Speech(options) { | |||
}; | |||
|
|||
common.GrpcService.call(this, config, options); | |||
this.api = new v1beta1(options).speechApi(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -87,6 +88,9 @@ function Speech(options) { | |||
}; | |||
|
|||
common.GrpcService.call(this, config, options); | |||
this.api = { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -87,6 +88,9 @@ function Speech(options) { | |||
}; | |||
|
|||
common.GrpcService.call(this, config, options); | |||
this.api = { | |||
speechApi: v1beta1(options).speechApi() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Just adding the |
Anything to call out here, or are you going to file something somewhere else? |
Regarding camel case, it looks like Regarding pagination, will file elsewhere. |
There's a new release of gax out (0.7.0) which camelCases and upgrades to gRPC@1.0. I believe we're now just waiting on the API files to be generated. |
I'll wait for that PR to be merged then. |
The PR with the re-generated files has been merged. |
}; | ||
|
||
self.request(protoOpts, reqOpts, function(err, apiResponse) { | ||
self.api.Speech.syncRecognize(config, foundFile, function(err, apiResponse) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Updated |
My initial attempt at using the autogen layer in the handwritten layer. I have a concern:
It would appear that
gax-nodejs
does not translate camel case option names into the snake case names defined the proto. WheresampleRate
worked before, thy tests forrecognize
andcreateRecognitionStream
started failing until I switched it tosample_rate
.Other than that it seems to work fine.
I found some other
gax-nodejs
usability issues with pagination that don't apply here.