Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0f5f7bf5
authored
Mar 21, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]输出转换优化
1 parent
e1a5f96c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
funasr_service.py
mysql_service/funasr_db.py
funasr_service.py
View file @
0f5f7bf
...
@@ -100,7 +100,7 @@ def deal_worker(task_id: str):
...
@@ -100,7 +100,7 @@ def deal_worker(task_id: str):
funasr_db
.
update_ali_asr_model_res
(
task_id
,
output_res
,
0
)
funasr_db
.
update_ali_asr_model_res
(
task_id
,
output_res
,
0
)
return
return
sentence_info
=
output_res
[
0
][
"sentence_info"
]
sentence_info
=
output_res
[
0
][
"sentence_info"
]
log
.
info
(
"output_res.sentence_info:
%
s"
%
sentence_info
)
#
log.info("output_res.sentence_info: %s" % sentence_info)
json_output
=
fine_grained_transform_output
(
sentence_info
)
json_output
=
fine_grained_transform_output
(
sentence_info
)
execute_time
=
time
.
perf_counter
()
-
consuming_start_time
execute_time
=
time
.
perf_counter
()
-
consuming_start_time
funasr_db
.
update_ali_asr_model_res
(
task_id
,
json_output
,
int
((
execute_time
*
1000
)))
funasr_db
.
update_ali_asr_model_res
(
task_id
,
json_output
,
int
((
execute_time
*
1000
)))
...
...
mysql_service/funasr_db.py
View file @
0f5f7bf
...
@@ -49,5 +49,5 @@ def select_ali_asr_model_res(task_id: str):
...
@@ -49,5 +49,5 @@ def select_ali_asr_model_res(task_id: str):
def
select_ali_asr_model_wait
():
def
select_ali_asr_model_wait
():
select_sql
=
(
select_sql
=
(
f
"select id,task_id,file_url,task_status,output_data from ali_asr_model_res aamr where aamr.del_flag = 0 and "
f
"select id,task_id,file_url,task_status,output_data from ali_asr_model_res aamr where aamr.del_flag = 0 and "
f
"aamr.output_data is null and aamr.task_status
!
=
%
s;"
)
f
"aamr.output_data is null and aamr.task_status
=
=
%
s;"
)
return
pool
.
select_all
(
select_sql
,
1
)
return
pool
.
select_all
(
select_sql
,
0
)
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment