diff --git a/docs/speech-usage.rst b/docs/speech-usage.rst index 35920681f8d62..5cb998a182a17 100644 --- a/docs/speech-usage.rst +++ b/docs/speech-usage.rst @@ -31,8 +31,8 @@ create an instance of :class:`~google.cloud.speech.client.Client`. >>> client = speech.Client() -Asynchronous Recognition ------------------------- +Asychronous Recognition +----------------------- The :meth:`~google.cloud.speech.Client.async_recognize` sends audio data to the Speech API and initiates a Long Running Operation. Using this operation, you @@ -170,13 +170,13 @@ speech data to possible text alternatives on the fly. ... for result in results: ... for alternative in result.alternatives: ... print('=' * 20) - ... print('result_index: ' + str(result.result_index)) ... print('transcript: ' + alternative.transcript) ... print('confidence: ' + str(alternative.confidence)) ==================== transcript: hello thank you for using Google Cloud platform confidence: 0.927983105183 + By default the API will perform continuous recognition (continuing to process audio even if the speaker in the audio pauses speaking) until the client closes the output stream or until the maximum time limit has diff --git a/speech/tests/system.py b/speech/tests/system.py index 57c713b90b501..dd3dfdf143147 100644 --- a/speech/tests/system.py +++ b/speech/tests/system.py @@ -200,7 +200,6 @@ def test_stream_recognize(self): with open(AUDIO_FILE, 'rb') as file_obj: for results in self._make_streaming_request(file_obj): - self.assertIsInstance(results.result_index, int) self._check_results(results.alternatives) def test_stream_recognize_interim_results(self):