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 f9675fb0
authored
Mar 25, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]热词优化
1 parent
5b1b363b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
funasr_service.py
funasr_service.py
View file @
f9675fb
...
@@ -119,9 +119,6 @@ def deal_worker(task_id: str):
...
@@ -119,9 +119,6 @@ def deal_worker(task_id: str):
return
return
sentence_info
=
output_res
[
0
][
"sentence_info"
]
sentence_info
=
output_res
[
0
][
"sentence_info"
]
json_output
=
fine_grained_transform_output
(
sentence_info
)
json_output
=
fine_grained_transform_output
(
sentence_info
)
json_output
=
json_output
.
replace
(
"m 五"
,
"M5"
)
json_output
=
json_output
.
replace
(
"m 七"
,
"M7"
)
json_output
=
json_output
.
replace
(
"m 九"
,
"M9"
)
log
.
info
(
"json_output:
%
s"
%
json_output
)
log
.
info
(
"json_output:
%
s"
%
json_output
)
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
)))
...
@@ -142,6 +139,7 @@ def fine_grained_transform_output(sentence_info):
...
@@ -142,6 +139,7 @@ def fine_grained_transform_output(sentence_info):
duration
=
one
[
"end"
]
-
one
[
"start"
]
duration
=
one
[
"end"
]
-
one
[
"start"
]
output
.
append
(
model_output
(
one
[
"spk"
],
one
[
"start"
],
duration
,
one
[
"text"
])
.
to_dict
())
output
.
append
(
model_output
(
one
[
"spk"
],
one
[
"start"
],
duration
,
one
[
"text"
])
.
to_dict
())
json_output
=
json
.
dumps
(
output
,
ensure_ascii
=
False
)
json_output
=
json
.
dumps
(
output
,
ensure_ascii
=
False
)
json_output
=
json_output
.
replace
(
"m 五"
,
"M5"
)
.
replace
(
"m 七"
,
"M7"
)
.
replace
(
"m 九"
,
"M9"
)
return
json_output
return
json_output
...
...
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