Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add xunfei voice #1999

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: remove some xunfei voice log
  • Loading branch information
Saboteur7 authored Jun 4, 2024
commit b777f27cb7201e95e9b145f1b880214c7662c10a
10 changes: 5 additions & 5 deletions voice/xunfei/xunfei_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down