| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| @@ -123,8 +123,9 @@ def _update(self, response): | |||
| raw_results = response.get('response', {}).get('results', None) | |||
| from google.cloud.speech.transcript import Transcript | ||
|
|
||
|
|
||
| class SpeechResult(object): |
| results.append(Transcript.from_api_repr(result)) | ||
| for result in raw_results: | ||
| for alternative in result['alternatives']: | ||
| results.append(Transcript.from_api_repr(alternative)) |
| self.assertEqual('123456789', operation.name) | ||
| self.assertTrue(operation.complete) | ||
|
|
||
| self.assertIsInstance(operation.results, list) |
…-operation-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
| Back | FazBrowse Home | New Git URL |
@dhermes mentioned this in a previous review.
This is correct and I also cleaned up the docs.
In my testing with async, I haven't gotten more than one alternative to show up, even whith max_alternatives=2. So that's why there isn't two in the doc example.