Uh oh!
There was an error while loading. Please reload this page.
Add Speech Streaming usage documentation. - #2483
Conversation
d301917 to
4456756Comparedaspecster
commented
Oct 6, 2016
dhermes
left a comment
There was a problem hiding this comment.
My nits aren't really with these docs, they are with the implementation. WDYT?
| >>> results = client.stream_recognize('hello.flac', 'FLAC', 44100, | ||
| ... interim_results=True) | ||
| >>> print results |
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.
| 0.96976006031 | ||
| For continuous speech containing more than one word, the ``single_utterance`` | ||
| option should be disabled. |
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.
| >>> from google.cloud import speech | ||
| >>> client = speech.Client() | ||
| >>> results = client.stream_recognize('hello.flac', 'FLAC', 44100) |
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.
| >>> results[2].alternatives[0].transcript | ||
| hello | ||
| >>> results[2].alternatives[0].confidence | ||
| 0.96976006031 |
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.
| } | ||
| is_final: true | ||
| } | ||
| ] |
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.
| transcript: Hello, this is one test | ||
| confidence: 0 | ||
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.
| >>> sample = client.sample(source_uri='gs://my-bucket/recording.flac', | ||
| ... encoding=Encoding.FLAC, | ||
| ... sample_rate=44100) | ||
| >>> results = client.stream_recognize(sample, single_utterance=False) |
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.
| ... encoding=Encoding.FLAC, | ||
| ... sample_rate=44100) | ||
| >>> results = client.stream_recognize(sample, interim_results=True) | ||
| >>> print results[0].alternatives.transcript |
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.
daspecster
commented
Oct 10, 2016
I'm going to close this and make a new PR with the whole shebang. |
Speech streaming has some implications to it that I think could be good to talk about.
interum_resultsisTrue, should weyieldthe results as we receive them?