|
@@ -148,14 +148,10 @@ class MyAudioMediaPlayer(pj.AudioMediaPlayer):
|
|
|
|
|
|
def onEof2(self):
|
|
|
# self.stopTransmit(self.sink)
|
|
|
- threading.Thread(target=self._handle_on_complete, daemon=True).start()
|
|
|
- # if self.on_complete:
|
|
|
- # self.on_complete(self.player_id)
|
|
|
-
|
|
|
- def _handle_on_complete(self):
|
|
|
if self.on_complete:
|
|
|
self.on_complete(self.player_id)
|
|
|
|
|
|
+
|
|
|
# Subclass to extend the Account and get notifications etc.
|
|
|
class Account(pj.Account):
|
|
|
def __init__(self, agent, user_part, **kwargs):
|
|
@@ -349,8 +345,7 @@ class MyCall(pj.Call):
|
|
|
self.digit = ''
|
|
|
self.inputLongStart = time.time()
|
|
|
#播放完毕执行的动作
|
|
|
- threading.Thread(target=self._handle_say_end_action, args=(self.action,), daemon=True).start()
|
|
|
- # self.say_end_action(self.action)
|
|
|
+ self.say_end_action(self.action)
|
|
|
|
|
|
def bot_say_hello(self):
|
|
|
self.chat(user_asr_text="start")
|