|
@@ -86,7 +86,7 @@ class TestSt:
|
|
|
if self.sr:
|
|
|
# print("Sending audio data of length:", len(audio_data))
|
|
|
self.sr.send_audio(audio_data)
|
|
|
- print("Audio data sent.")
|
|
|
+ # print("Audio data sent.")
|
|
|
# if self.sr and not self.is_closed:
|
|
|
# with self.lock:
|
|
|
# try:
|
|
@@ -103,6 +103,12 @@ class TestSt:
|
|
|
# except Exception as e:
|
|
|
# print(f"Error stopping ASR: {e}")
|
|
|
|
|
|
+ def close(self):
|
|
|
+ try:
|
|
|
+ self.sr.stop()
|
|
|
+ except Exception as e:
|
|
|
+ print(f"Error stopping ASR: {e}")
|
|
|
+
|
|
|
def __test_run(self):
|
|
|
print("Thread:{} start..".format(self.__id))
|
|
|
nls.enableTrace(True)
|