Commit c8f70693 by 杨林龙

Merge branch 'master' of http://192.168.3.233:8090/eshiled-new/funasr_web

# Conflicts:
#	funasr.log
2 parents 4bceed3b 29fd8587
This diff could not be displayed because it is too large.
......@@ -31,6 +31,6 @@ class FunasrService(object):
@timeit
def transform(self):
res = model.generate(input=self.path, batch_size_s=300, hotword="魔搭")
res = model.generate(input=self.path, batch_size_s=300, hotword="问界 80")
# print(res)
return res
......@@ -204,18 +204,20 @@ def deal_worker(url: str, task_id: str):
consuming_start_time = time.perf_counter()
# 解析音频
res = FunasrService(url).transform()
log.info("res: %s" % res)
if len(res) < 1:
log.info("res: %s" % res)
updateSql = (
f"update ali_asr_model_res t set t.output_data = '{res}',t.task_status = 1 where t.task_id = '{task_id}';")
db.execute_modify(updateSql)
return
sentence_info = res[0]["sentence_info"]
log.info("res.sentence_info: %s" % sentence_info)
output = []
content = ""
spk = 0
duration = 0
offset = 0
for one in res[0]["sentence_info"]:
for one in sentence_info:
duration = duration + (one["end"] - one["start"])
offset = one["start"]
if spk == one["spk"]:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!