diff --git a/python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py b/python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py index 4c5bd633..d3e198cd 100755 --- a/python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py +++ b/python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py @@ -125,10 +125,10 @@ def main(): if result and (last_result != result): last_result = result - display.print(segment_id, result) - + print("\r{}:{}".format(segment_id, result), end="", flush=True) if is_endpoint: if result: + print("\r{}:{}".format(segment_id, result), flush=True) segment_id += 1 recognizer.reset(stream) diff --git a/python-api-examples/speech-recognition-from-microphone.py b/python-api-examples/speech-recognition-from-microphone.py index fe2b0167..efed81b6 100755 --- a/python-api-examples/speech-recognition-from-microphone.py +++ b/python-api-examples/speech-recognition-from-microphone.py @@ -113,7 +113,7 @@ def main(): result = recognizer.get_result(stream) if last_result != result: last_result = result - display.print(-1, result) + print("\r{}".format(result), end="", flush=True) if __name__ == "__main__":