feat: save_voice_and_speak 添加日志

This commit is contained in:
caoqianming 2024-11-20 09:56:00 +08:00
parent 598cadc4bb
commit 16272cd15f
1 changed files with 1 additions and 2 deletions

View File

@ -161,7 +161,7 @@ def save_voice_and_speak(event: Event):
# else:
# _, event.voice, _ = generate_voice(event.voice_msg, v_p)
# event.save()
if main_cate.speaker_on and event.voice:
if main_cate.speaker_on and event.voice_msg:
sps = []
if event.area: # 如果事件存在发生区域
sps = list(TDevice.objects.filter(area=event.area,
@ -175,7 +175,6 @@ def save_voice_and_speak(event: Event):
for i in sps2:
if i not in sps:
sps.append(i)
# myLogger.info('获取到喇叭:' + str(sps))
if sps:
myLogger.info(f'喇叭播放:{event.voice_msg}, {sps}, {v_num}')
spClient.speak(event.voice_msg, sps, v_num, v_p=v_p)