Преглед на файлове

chore: remove some xunfei voice log

master
Saboteur7 GitHub преди 5 месеца
родител
ревизия
b777f27cb7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
променени са 1 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. +5
    -5
      voice/xunfei/xunfei_asr.py

+ 5
- 5
voice/xunfei/xunfei_asr.py Целия файл

@@ -109,23 +109,23 @@ def on_message(ws, message):
rep_start = rep[0]
rep_end = rep[1]
for sn in range(rep_start,rep_end+1):
print("before pop",whole_dict)
print("sn",sn)
#print("before pop",whole_dict)
#print("sn",sn)
whole_dict.pop(sn,None)
print("after pop",whole_dict)
#print("after pop",whole_dict)
results = ""
for i in data:
for w in i["cw"]:
results += w["w"]
whole_dict[sn]=results
print("after add",whole_dict)
#print("after add",whole_dict)
else:
results = ""
for i in data:
for w in i["cw"]:
results += w["w"]
whole_dict[sn]=results
print("sid:%s call success!,data is:%s" % (sid, json.dumps(data, ensure_ascii=False)))
#print("sid:%s call success!,data is:%s" % (sid, json.dumps(data, ensure_ascii=False)))
except Exception as e:
print("receive msg,but parse exception:", e)



Loading…
Отказ
Запис