Uh oh!
There was an error while loading. Please reload this page.
Updates from #2344 for speech API. - #2495
Conversation
| 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
left a comment
There was a problem hiding this comment.
Looks mostly good. Assuming tests are green, these changes should be easy to make / uncontroversial.
| ... 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| ... 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| _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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| re-sampling). | ||
| :type content: bytes | ||
| :param content: Byte stream of audio. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
0a585b5 to
b472c07Compareb472c07 to
c7b159dComparedaspecster
commented
Oct 5, 2016
daspecster
commented
Oct 5, 2016
daspecster
commented
Oct 6, 2016
@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.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
commented
Oct 6, 2016
@daspecster I haven't followed since @tseaver requested the |
tseaver
left a comment
There was a problem hiding this comment.
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).
daspecster
commented
Oct 6, 2016
@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. |
f14c72e to
04bf28dComparedaspecster
commented
Oct 6, 2016
@tseaver added the |
daspecster
commented
Oct 6, 2016
Thanks @tseaver! |
Updates from googleapis#2344 for speech API.
See: #2344 (comment)
async_recognize()andsync_recognize()method signatures and examples.