-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Speech v1 #3266
Speech v1 #3266
Conversation
Unit tests pass, need to check on system tests.
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.
Looks mostly OK. Lot's of cosmetic, not much content
profanity_filter=profanity_filter, | ||
speech_context=SpeechContext(phrases=speech_context)) | ||
sample_rate_hertz=sample.sample_rate_hertz, | ||
speech_contexts=[SpeechContext(phrases=speech_contexts)], |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -68,7 +68,7 @@ def __init__(self, credentials=None, _http=None, _use_grpc=None): | |||
self._use_grpc = _use_grpc | |||
|
|||
def sample(self, content=None, source_uri=None, stream=None, encoding=None, | |||
sample_rate=None): | |||
sample_rate_hertz=None): |
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.
speech/setup.py
Outdated
@@ -50,14 +50,14 @@ | |||
} | |||
|
|||
REQUIREMENTS = [ | |||
'google-cloud-core >= 0.24.0, < 0.25dev', | |||
'google-cloud-core >= 0.24.0, < 0.26dev', |
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.
speech/setup.py
Outdated
] | ||
|
||
setup( | ||
name='google-cloud-speech', | ||
version='0.24.0', | ||
version='0.25.0', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -46,6 +47,9 @@ def _wait_until_complete(operation, max_attempts=10): | |||
:rtype: bool | |||
:returns: Boolean indicating if the operation is complete. | |||
""" | |||
# This bizarre delay is necessary because the v1 API seems to return | |||
# the v1beta1 type URL sometimes if you poll too soon. | |||
time.sleep(3) |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM pending CI |
@gguuss Are the samples ready for this? We are ready to push it out once your documentation is updated. |
I'll let y'all know when I have my change in a branch |
@lukesneeringer seems weird that the samples have to do |
@jonparrott We do not. Those changes are red in the diff. :-) |
@gguuss I am ready to push this to PyPI, as soon as you say you are ready. |
@gguuss Poke. (This is due today, so I will push it to PyPI around noon regardless.) |
I'm ready to go. |
hello |
This updates our manual client library to the Speech v1 API. This entails several **backwards incompatible changes**: * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`. * The `sync_recognize` method has been renamed to `recognize` on every class where it appears. * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears. * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears. Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
This updates our manual client library to the Speech v1 API. This entails several **backwards incompatible changes**: * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`. * The `sync_recognize` method has been renamed to `recognize` on every class where it appears. * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears. * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears. Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
This updates our manual client library to the Speech v1 API. This entails several **backwards incompatible changes**: * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`. * The `sync_recognize` method has been renamed to `recognize` on every class where it appears. * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears. * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears. Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
…loudPlatform/python-docs-samples#3266) Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
This updates our manual client library to the Speech v1 API. This entails several **backwards incompatible changes**: * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`. * The `sync_recognize` method has been renamed to `recognize` on every class where it appears. * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears. * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears. Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
This updates our manual client library to the Speech v1 API.
This entails several backwards incompatible changes:
language_code
parameter is no longer optional anywhere. It must be explicitly specified, and does not default to'en-US'
.sync_recognize
method has been renamed torecognize
on every class where it appears.async_recognize
method has been renamed tolong_running_recognize
on every class where it appears.sample_rate
parameter and property has been renamed tosample_rate_hertz
everywhere it appears.Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The
START_OF_SPEECH
,END_OF_SPEECH
, andEND_OF_AUDIO
events have been removed.