GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add speech async gapic by daspecster · Pull Request #2663 · googleapis/google-cloud-python

Conversation

@daspecster

@daspecster daspecster commented Nov 2, 2016 •
edited by dhermes
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This will need #2661 in order for travis-ci to pass since I don't need metadata.py and operation.py after @dhermes refactored the core operation.py@ Thanks!

@dhermes, I think we talked about this back and forth a little bit, but as you can see from the system tests, the surface is much different between sync_recognize()'s results and async_recognize()'s results.

There will be some updates for the gRPC version of sync_recognize() that will follow this as well.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daspecster daspecster added the api: speech Issues related to the Speech-to-Text API. label Nov 2, 2016
@daspecster daspecster assigned tseaver and dhermes Nov 2, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 2, 2016
@daspecster
daspecster force-pushed the add-speech-async-gapic branch from 0e14c9d to 5078aa4 Compare November 2, 2016 03:07
@daspecster daspecster mentioned this pull request Nov 2, 2016
Re-factoring Speech operation to use the base class. #2664
Merged
@daspecster
daspecster force-pushed the add-speech-async-gapic branch 2 times, most recently from 54b981b to eb08066 Compare November 2, 2016 04:10
@daspecster daspecster mentioned this pull request Nov 2, 2016
Tracking Speech API development. #2522
Closed
14 tasks done
@daspecster
daspecster force-pushed the add-speech-async-gapic branch from eb08066 to 46cd146 Compare November 2, 2016 04:17
daspecster
daspecster commented Nov 2, 2016
View reviewed changes
Comment thread speech/setup.py Outdated
REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'grpcio >= 1.0.0, < 2.0dev',
'google-gax >= 0.14.1, < 0.15dev',

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster
daspecster force-pushed the add-speech-async-gapic branch 2 times, most recently from 0ca8559 to bf805e3 Compare November 2, 2016 04:49
dhermes
dhermes reviewed Nov 2, 2016
View reviewed changes
Comment thread speech/google/cloud/speech/_gax.py Outdated
from google.cloud._helpers import make_secure_stub
from google.cloud.connection import DEFAULT_USER_AGENT
from google.cloud.speech.operation import Operation
from google.cloud.operation import register_type

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/google/cloud/speech/_gax.py Outdated
OPERATIONS_API_HOST = 'speech.googleapis.com'

register_type(AsyncRecognizeMetadata)
register_type(AsyncRecognizeResponse)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/google/cloud/speech/_gax.py Outdated
words to the vocabulary of the recognizer.

:raises NotImplementedError: Always.
:rtype: :class:`~google.cloud.operation.Opeartion`

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/google/cloud/speech/_gax.py Outdated
api = self._gapic_api
response = api.async_recognize(config=config, audio=audio)

self._client._operations_stub = make_secure_stub(

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/setup.py
REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'gapic-google-cloud-speech-v1beta1 >= 0.11.1, < 0.12.0',
'grpc-google-cloud-speech-v1beta1 >= 0.11.1, < 0.12.0',

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated
credentials = _Credentials()
client = self._makeOne(credentials=credentials, use_gax=True)
client.connection = _Connection()
_MockGAPICSpeechAPI._results = []

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py
credentials = _Credentials()
client = self._makeOne(credentials=credentials)
client.connection = _Connection()
client.connection.credentials = credentials

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py
operation = client.async_recognize(sample)

self.assertFalse(operation.complete)
self.assertIsNone(operation.response)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated


class _MockGAPICMetadata(object):
type_url = None

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster
daspecster force-pushed the add-speech-async-gapic branch from 375feeb to 2e9f486 Compare November 2, 2016 18:20
@daspecster

daspecster commented Nov 2, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes I think there are just thow two open questions. Did you have anything else?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Nov 3, 2016
View reviewed changes
Comment thread speech/unit_tests/test_client.py
@staticmethod
def _make_result(transcript, confidence):
from google.cloud.grpc.speech.v1beta1 import cloud_speech_pb2
return cloud_speech_pb2.SpeechRecognitionResult(

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated
alternatives=[
cloud_speech_pb2.SpeechRecognitionAlternative(
transcript=transcript,
confidence=confidence,

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py

def _make_sync_response(self, *results):
from google.cloud.grpc.speech.v1beta1 import cloud_speech_pb2
response = cloud_speech_pb2.SyncRecognizeResponse(

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated
from google.cloud.speech import _gax as MUT

from google.cloud import speech
from google.cloud.speech import _gax as MUT

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated
client.connection = _Connection()
client.connection.credentials = credentials

_MockGAPICSpeechAPI._response = self._make_sync_response()

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py
credentials = _Credentials()
client = self._makeOne(credentials=credentials)
client.connection = _Connection()
client.connection.credentials = credentials

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py Outdated
mock_response = self._response
mock_response.results = self._results
return mock_response
# self._response.results = self._results

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread speech/unit_tests/test_client.py
_results = None

def async_recognize(self, config, audio):
from google.longrunning.operations_pb2 import Operation

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster daspecster added the PR: Needs to be squashed label Nov 3, 2016
dhermes
dhermes reviewed Nov 3, 2016
View reviewed changes
Comment thread speech/unit_tests/test_client.py Outdated
"confidence": 0.9224355
}, {
"transcript": 'testing 4 5 6',
"confidence": 0.0123456

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Nov 3, 2016
View reviewed changes
Comment thread speech/unit_tests/test_client.py Outdated

with self.assertRaises(ValueError):
with _Monkey(MUT, SpeechApi=_MockGAPICSpeechAPI):
with _Monkey(_gax, SpeechApi=speech_api):

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Nov 3, 2016
View reviewed changes
Comment thread speech/unit_tests/test_client.py Outdated
self.assertEqual(results[1].transcript,
alternatives[1]['transcript'])
self.assertEqual(results[1].confidence,
alternatives[1]['confidence'])

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes approved these changes Nov 3, 2016
View reviewed changes

@dhermes dhermes left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM provided you clear up my most recent comments and resolve the setup.py question for @jonparrott

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daspecster
Add speech async GAPIC.
5d4272f
@daspecster
daspecster force-pushed the add-speech-async-gapic branch from 77b6d16 to 5d4272f Compare November 3, 2016 18:52
@daspecster daspecster removed the PR: Needs to be squashed label Nov 3, 2016
@daspecster

daspecster commented Nov 3, 2016

Copy link
Copy Markdown
Contributor Author

Travis has gone on strike again...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster

daspecster commented Nov 3, 2016

Copy link
Copy Markdown
Contributor Author

Finally travis ran this job. @dhermes, I'm merging(in 15minutes) since I got your suggestions in.

dhermes reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 3, 2016

Copy link
Copy Markdown
Contributor

Feel free to merge now

daspecster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster
daspecster merged commit 3de5bc0 into googleapis:master Nov 3, 2016
@daspecster daspecster mentioned this pull request Nov 3, 2016
Speech unit tests cleanup. #2676
Merged
@daspecster daspecster mentioned this pull request Nov 9, 2016
Add async support to Speech API #2384
Closed
@dhermes dhermes mentioned this pull request Nov 14, 2016
Upgrading core to version to 0.21.0. #2733
Merged
@daspecster daspecster mentioned this pull request Nov 29, 2016
Add support for query parameters #2776
Merged
@daspecster
daspecster deleted the add-speech-async-gapic branch January 24, 2017 15:17
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
@daspecster
Merge pull request googleapis#2663 from daspecster/add-speech-async-g…
1b209fd
…apic

Add speech async gapic
@theacodes theacodes unassigned dhermes Sep 28, 2018
atulep pushed a commit that referenced this pull request Apr 3, 2023
@daspecster
Merge pull request #2663 from daspecster/add-speech-async-gapic
64537ed
Add speech async gapic
atulep pushed a commit that referenced this pull request Apr 18, 2023
@daspecster
Merge pull request #2663 from daspecster/add-speech-async-gapic
f3bbb9a
Add speech async gapic
parthea pushed a commit that referenced this pull request Oct 22, 2023
@daspecster
Merge pull request #2663 from daspecster/add-speech-async-gapic
5aa40c0
Add speech async gapic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@theacodes theacodes theacodes left review comments
@dhermes dhermes dhermes approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@tseaver tseaver

Labels

api: speech Issues related to the Speech-to-Text API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@daspecster @dhermes @theacodes @tseaver @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.