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 6cd3d607
authored
Mar 25, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]核心数优化
1 parent
7f4fdcd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
funasr_service.py
funasr_service.py
View file @
6cd3d60
...
@@ -18,7 +18,7 @@ model = AutoModel(
...
@@ -18,7 +18,7 @@ model = AutoModel(
spk_model
=
"cam++"
,
spk_model
=
"cam++"
,
ncpu
=
2
,
ncpu
=
2
,
device
=
"cpu"
,
device
=
"cpu"
,
batch_size_s
=
1
00
,
batch_size_s
=
1
,
batch_size_threshold_s
=
60
*
60
batch_size_threshold_s
=
60
*
60
# model="iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
# model="iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
# vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch",
# vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch",
...
@@ -45,7 +45,7 @@ class FunasrService(object):
...
@@ -45,7 +45,7 @@ class FunasrService(object):
@timeit
@timeit
def
transform
(
self
):
def
transform
(
self
):
res
=
model
.
generate
(
input
=
self
.
path
,
batch_size_s
=
300
,
hotword
=
"""问界
\n
质保经理 80
\n
易损易耗件 80
\n
电瓶 80
\n
M5 80
res
=
model
.
generate
(
input
=
self
.
path
,
batch_size_s
=
1
,
hotword
=
"""问界
\n
质保经理 80
\n
易损易耗件 80
\n
电瓶 80
\n
M5 80
\n
M7 80
\n
M9 80
\n
石子 80
\n
橡胶棒 80
\n
电子助力泵 80
\n
电子真空助力泵 80
\n
充电桩 80
\n
密封圈 80
\n
4S店 80
\n
老化 80
\n
M7 80
\n
M9 80
\n
石子 80
\n
橡胶棒 80
\n
电子助力泵 80
\n
电子真空助力泵 80
\n
充电桩 80
\n
密封圈 80
\n
4S店 80
\n
老化 80
"""
)
"""
)
# print(res)
# print(res)
...
...
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