From 94d77fa52e20717768753beef5b1eefbda8325ac Mon Sep 17 00:00:00 2001 From: eee <39297833+dongqianzhuan@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:14:33 +0800 Subject: [PATCH] remove sherpa_onnx.Display (#109) * fix garbled console output with chinese characters * use print to instead sherpa_onnx.Display --- ...speech-recognition-from-microphone-with-endpoint-detection.py | 1 - python-api-examples/speech-recognition-from-microphone.py | 1 - 2 files changed, 2 deletions(-) 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 d3e198cd..32615106 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 @@ -110,7 +110,6 @@ def main(): last_result = "" segment_id = 0 - display = sherpa_onnx.Display(max_word_per_line=30) with sd.InputStream(channels=1, dtype="float32", samplerate=sample_rate) as s: while True: samples, _ = s.read(samples_per_read) # a blocking read diff --git a/python-api-examples/speech-recognition-from-microphone.py b/python-api-examples/speech-recognition-from-microphone.py index efed81b6..233c3587 100755 --- a/python-api-examples/speech-recognition-from-microphone.py +++ b/python-api-examples/speech-recognition-from-microphone.py @@ -102,7 +102,6 @@ def main(): samples_per_read = int(0.1 * sample_rate) # 0.1 second = 100 ms last_result = "" stream = recognizer.create_stream() - display = sherpa_onnx.Display(max_word_per_line=40) with sd.InputStream(channels=1, dtype="float32", samplerate=sample_rate) as s: while True: samples, _ = s.read(samples_per_read) # a blocking read