|
@@ -252,6 +252,7 @@ class MyCall(pj.Call):
|
|
if self.cur_player_file:
|
|
if self.cur_player_file:
|
|
player_id = murmur3_32(self.cur_player_file)
|
|
player_id = murmur3_32(self.cur_player_file)
|
|
return self.player_complete_dict.get(player_id)
|
|
return self.player_complete_dict.get(player_id)
|
|
|
|
+
|
|
def onDtmfDigit(self, prm):
|
|
def onDtmfDigit(self, prm):
|
|
# 判断是否播放完成 否则不记录用户说的内容
|
|
# 判断是否播放完成 否则不记录用户说的内容
|
|
if not self.is_play_complete():
|
|
if not self.is_play_complete():
|
|
@@ -388,11 +389,7 @@ class MyCall(pj.Call):
|
|
print("Failed to stopTransmit:", e)
|
|
print("Failed to stopTransmit:", e)
|
|
self.audio_port = None # 或调用相关销毁方法
|
|
self.audio_port = None # 或调用相关销毁方法
|
|
if self.audio_media:
|
|
if self.audio_media:
|
|
- try:
|
|
|
|
- self.audio_media.stopTransmit()
|
|
|
|
- print("Success to stopTransmit:")
|
|
|
|
- except pj.Error as e:
|
|
|
|
- print("Failed to stopTransmit:", e)
|
|
|
|
|
|
+ # self.audio_media.stopTransmit()
|
|
self.audio_media = None
|
|
self.audio_media = None
|
|
|
|
|
|
self.asr.close()
|
|
self.asr.close()
|