Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vad模型在进程下数据卡住不动 #1701

Open
I-am-your-grandfather opened this issue May 8, 2024 · 0 comments
Open

Vad模型在进程下数据卡住不动 #1701

I-am-your-grandfather opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@I-am-your-grandfather
Copy link

我用进程方式启动AutoModel处理,16K单声道的wav音频数据,vad模型内部处理数据直接卡住不动,请大佬帮我看看进程启动下vad模型内部处理数据为什么会卡住。
funasr->utils->load_utils.py的64行 data_or_path_or_list = data_or_path_or_list.mean(0)

ps:用线程模式就能正常执行,但咱们线程模式长时间运行,有严重的内存泄漏,而且vad不支持多线程。
Code
.....
pool = multiprocessing.Pool(2)
pool.apply(func=convert, args=(wavepath))

.....
def convert(wavepath):
model = AutoModel(model="iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
model_revision="v2.0.4",
vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch",
vad_model_revision="v2.0.4",
punc_model="iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch",
punc_model_revision="v2.0.4",
spk_model="iic/speech_campplus_sv_zh-cn_16k-common",
spk_model_revision="v2.0.2",
ncpu=1,
device="cpu",
disable_pbar=True,
disable_log=False
)

model.generate(input=wavepath)
)
What have you tried?
In a pytorch docker container, run pip install funasr and then the script above.

What's your environment?
OS (e.g., Linux):
FunASR Version (e.g., 1.0.0): 1.0.19
ModelScope Version (e.g., 1.11.0): None (do not need it)
PyTorch Version (e.g., 2.0.0): 2.2.2
How you installed funasr (pip, source): pip
Python version: 3.10.14
GPU (e.g., V100M32): NVIDIA GeForce RTX 4090

@I-am-your-grandfather I-am-your-grandfather added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant