-
Notifications
You must be signed in to change notification settings - Fork 640
Make Speech client use autogen layer #1631
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
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 |
packages/speech/src/index.js
Outdated
| }; | ||
|
|
||
| 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.
| }; | ||
|
|
||
| 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.
packages/speech/src/index.js
Outdated
|
|
||
| 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 [email protected]. 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. |
packages/speech/src/index.js
Outdated
| }; | ||
|
|
||
| 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 |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jackspeak](https://togithub.com/isaacs/jackspeak) | [`3.4.0` -> `3.4.3`](https://renovatebot.com/diffs/npm/jackspeak/3.4.0/3.4.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>isaacs/jackspeak (jackspeak)</summary> ### [`v3.4.3`](https://togithub.com/isaacs/jackspeak/compare/v3.4.2...v3.4.3) [Compare Source](https://togithub.com/isaacs/jackspeak/compare/v3.4.2...v3.4.3) ### [`v3.4.2`](https://togithub.com/isaacs/jackspeak/compare/v3.4.1...v3.4.2) [Compare Source](https://togithub.com/isaacs/jackspeak/compare/v3.4.1...v3.4.2) ### [`v3.4.1`](https://togithub.com/isaacs/jackspeak/compare/v3.4.0...v3.4.1) [Compare Source](https://togithub.com/isaacs/jackspeak/compare/v3.4.0...v3.4.1) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/gax-nodejs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
My initial attempt at using the autogen layer in the handwritten layer. I have a concern:
It would appear that
gax-nodejsdoes not translate camel case option names into the snake case names defined the proto. WheresampleRateworked before, thy tests forrecognizeandcreateRecognitionStreamstarted failing until I switched it tosample_rate.Other than that it seems to work fine.
I found some other
gax-nodejsusability issues with pagination that don't apply here.