Skip to content
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

How to specify quotaUser upon Speech Streaming request #475

Closed
heroddaji opened this issue Aug 24, 2016 · 8 comments
Closed

How to specify quotaUser upon Speech Streaming request #475

heroddaji opened this issue Aug 24, 2016 · 8 comments
Assignees
Labels
ML 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@heroddaji
Copy link

heroddaji commented Aug 24, 2016

Dear,

We have a requirement to limit per user usage of speech streaming recognition.
We want to limit by user identity "quotaUser" param as specified here:
https://support.google.com/cloud/answer/7035610?hl=en

So far I cannot find out how to do that from Cloud Speech API doc.
Could you please help me providing a sample code in python?
if it even better if you use speech_streaming.py example code.

@puneith
Copy link
Contributor

puneith commented Aug 24, 2016

@heroddaji Please take a loot at https://cloud.google.com/speech/limits to use the API appropriately.

@theacodes
Copy link
Contributor

@heroddaji it doesn't appear our grpc clients currently expose the ability to do userquota, or if they do, it's very non-obvious how to do so.

@theacodes
Copy link
Contributor

@heroddaji there are several ways to limit it from your end (such as with redis).

@puneith
Copy link
Contributor

puneith commented Aug 25, 2016

@heroddaji Support for the quotaUser is no longer available. If the request is authenticated, the user QPS limit applies to the actual user (Google user ID). Otherwise, client IP is used. Hope that helps.

@heroddaji
Copy link
Author

heroddaji commented Aug 25, 2016

thank you, i have not yet fully understand the part "the user QPS limit applies to the actual user (Google user ID)".

In which situation this applies? because in our app, we will use our google_json_secret key (our id). and distribute the app to users:

  • Does this means if many users use the app, they are using our google_user_id ?
  • Or do we need to have user to do authentication, for example using "oauth" to obtain their id and use in the speech request?
  • And in which situation the client IP is used ? because it seems we always need to have some authentication before using speech api

Sorry for confusion, but I hope you all can help me.

@puneith
Copy link
Contributor

puneith commented Aug 25, 2016

@heroddaji Can you please give me details and specifics about how you are using or intend to use the speech api and distribute it to your users? I do get a sense from your previous comment, but I don't want to assume. Thanks.

@theacodes
Copy link
Contributor

@heroddaji you shouldn't distribute your service account private key to end users. Client applications can't keep secrets, and private keys are intended for server-to-server communication.

@jerjou jerjou removed their assignment Sep 6, 2016
@puneith
Copy link
Contributor

puneith commented Sep 16, 2016

@heroddaji Closing this due to no activity. Please, open another issue if you have further questions. Also, adding to what @jonparrott said you should architect your system such that your app talks to the service which behind the scenes invokes the Speech API using the service account.

@puneith puneith closed this as completed Sep 16, 2016
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
telpirion pushed a commit that referenced this issue Jan 13, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sita04 pushed a commit that referenced this issue Feb 7, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
dandhlee pushed a commit that referenced this issue Feb 9, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
telpirion pushed a commit that referenced this issue Mar 13, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ML 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants