-
Notifications
You must be signed in to change notification settings - Fork 616
Regenerate speech API. Now it contains streamingRecognize method. #1775
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
This does not change src/index.js yet.
I've tried to integrate this with src/index, and it seems to work, except for the speech.createRecognizeStream({...})
.on('response', function(response) {
response === {
"code": 200,
"details": "",
"metadata": {
"_internal_repr": {
"content-disposition": [
"attachment"
]
}
},
"message": "OK"
}
})
.on('data', function() {...}) |
@jmuk to clarify, this We rename it to |
I see. It seems gax loses |
Could it be |
Maybe, what is the difference between the status and response objects? |
|
@callmehiphop wdyt? I think you were more closely connected with our implementation. |
I think something to note is that status and metadata occur at different times. Where metadata happens once the request starts, status doesn't happen until after all results have been processed. For that reason alone, I think in the veneer layer we typically listen for metadata. |
Ah, okay. So https://github.com/GoogleCloudPlatform/google-cloud-node/blob/116436fa789d8b0f7fc5100b19b424e3ec63e6bf/packages/common/src/grpc-service.js#L355 does take 'metadata' event, and create the response object with "code: 0" (i.e. succeeds). I'll do the same thing. |
Now it's added. |
I added a commit to use the new streaming method from our API. @callmehiphop could you take a look and push a commit that gets rid of anything we don't need, re: GrpcService? |
@stephenplusplus I don't think you can cut out |
Okay, thanks for taking a look. |
This does not change src/index.js yet.