|
@@ -91,6 +91,7 @@ class MyAudioMediaPort(pj.AudioMediaPort):
|
|
|
else:
|
|
|
if asr_text and not play_complete:
|
|
|
self.user_asr_texts.append(asr_text)
|
|
|
+ print('user_asr_texts', self.user_asr_texts)
|
|
|
if (asr_text and play_complete) or (play_complete and self.user_asr_texts):
|
|
|
if asr_text: # 等价于 if asr_text is not None and asr_text != ""
|
|
|
self.user_asr_texts.append(asr_text)
|
|
@@ -234,7 +235,6 @@ class MyCall(pj.Call):
|
|
|
def reset_wait_time(self):
|
|
|
self.play_complete_flag = False # 重置播放完成标志
|
|
|
self.play_start_time = None # 重置开始计时时间
|
|
|
- self.digit = ''
|
|
|
def get_phone(self):
|
|
|
import re
|
|
|
call_info = self.getInfo()
|
|
@@ -338,6 +338,7 @@ class MyCall(pj.Call):
|
|
|
def on_media_player_complete(self, player_id):
|
|
|
print('player complete')
|
|
|
self.player_complete_dict[player_id] = True
|
|
|
+ self.digit = ''
|
|
|
self.inputLongStart = time.time()
|
|
|
#播放完毕执行的动作
|
|
|
self.say_end_action(self.action)
|