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 29fd8587
authored
Mar 15, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
日志优化
1 parent
9fb0df83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
funasr.log
main.py
funasr.log
View file @
29fd858
This diff could not be displayed because it is too large.
main.py
View file @
29fd858
...
...
@@ -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"
]:
...
...
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