FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updates from #2344 for speech API. by daspecster · Pull Request #2495 · googleapis/google-cloud-python · GitHub

Updates from #2344 for speech API. - #2495

Merged
daspecster merged 4 commits into
googleapis:masterfrom
daspecster:cleanup-speech
Oct 6, 2016
Merged

Updates from #2344 for speech API.#2495
daspecster merged 4 commits into
googleapis:masterfrom
daspecster:cleanup-speech

Conversation

Copy link
Copy Markdown
Contributor

See: #2344 (comment)

  • Update async_recognize() and sync_recognize() method signatures and examples.
  • Add more examples showing usage of other options.

daspecster added the api: speech Issues related to the Speech-to-Text API. label Oct 4, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 4, 2016
Comment thread docs/speech-usage.rst
The :meth:`~google.cloud.speech.Client.sync_recognize` method converts speech
data to text and returns alternative text transcriptons.

This example uses ``language_code='en-GB'`` to better recognize a dialect from

This comment was marked as spam.

This comment was marked as spam.

dhermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks mostly good. Assuming tests are green, these changes should be easy to make / uncontroversial.

Comment thread docs/speech-usage.rst Outdated
... None, 'gs://my-bucket/recording.flac',
... 'FLAC', 16000, max_alternatives=2)
... 'FLAC', 16000, source_uri='gs://my-bucket/recording.flac',
... language_code='en-GB', max_alternatives=2, )

This comment was marked as spam.

This comment was marked as spam.

Comment thread docs/speech-usage.rst Outdated
... print('transcript: ' + alternative['transcript'])
... print('confidence: ' + alternative['confidence'])
====================
transcript: Hello, this is a f****** test

This comment was marked as spam.

This comment was marked as spam.

Comment thread speech/google/cloud/speech/client.py Outdated
_connection_class = Connection

def async_recognize(self, content, source_uri, encoding, sample_rate,
def async_recognize(self, encoding, sample_rate, content=None,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread speech/google/cloud/speech/client.py Outdated
re-sampling).

:type content: bytes
:param content: Byte stream of audio.

This comment was marked as spam.

This comment was marked as spam.

Comment thread speech/google/cloud/speech/client.py Outdated
omitted, profanities won't be filtered out.

:type source_uri: str
:param source_uri: URI that points to a file that contains audio

This comment was marked as spam.

This comment was marked as spam.

daspecster force-pushed the cleanup-speech branch 2 times, most recently from 0a585b5 to b472c07 Compare October 5, 2016 05:47

Copy link
Copy Markdown
Contributor Author

Updated! LMKWYT @dhermes @tseaver

Copy link
Copy Markdown
Contributor Author

Also @dhermes if you want I can hold off on this if you want #2500 in first.

Copy link
Copy Markdown
Contributor Author

@dhermes was there anything else on this?

"""Google Cloud Speech API wrapper."""

from google.cloud.speech.client import Client
from google.cloud.speech.client import Encoding

This comment was marked as spam.

dhermes commented Oct 6, 2016

Copy link
Copy Markdown
Contributor

@daspecster I haven't followed since @tseaver requested the Sample class. If he is OK with the changes I am OK with them.

tseaver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The change to the Sample class LGTM. Do we need to add a Client.sample() factory (basically to ease the developer's need to do extra imports).

Copy link
Copy Markdown
Contributor Author

@tseaver I think you may have eluded to that in your sample and I didn't make the connection so I took that out.

I'll add that and push it back up.

Copy link
Copy Markdown
Contributor Author

@tseaver added the @staticmethod on speech.client.Client. LMKWYT!

Copy link
Copy Markdown
Contributor Author

Thanks @tseaver!

daspecster merged commit fb10016 into googleapis:master Oct 6, 2016
daspecster deleted the cleanup-speech branch October 6, 2016 19:28
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL