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

使用Whisper-large-v3和cam++的组合报错 #2257

Open
MJ666-K opened this issue Dec 3, 2024 · 0 comments
Open

使用Whisper-large-v3和cam++的组合报错 #2257

MJ666-K opened this issue Dec 3, 2024 · 0 comments
Labels
question Further information is requested

Comments

@MJ666-K
Copy link

MJ666-K commented Dec 3, 2024

from funasr import AutoModel
import time

wav_file = "/mnt/data/toolbox_dir/voice_trans/test-file/vad_example.wav"

model = AutoModel(
model="/mnt/data/toolbox_dir/voice_trans/Whisper-large-v3",
vad_model="/mnt/data/toolbox_dir/voice_trans/speech_fsmn_vad_zh-cn-16k-common-pytorch",
vad_kwargs={"max_single_segment_time": 30000},
punc_model="/mnt/data/toolbox_dir/voice_trans/punc_ct-transformer_cn-en-common-vocab471067-large",
spk_model="/mnt/data/toolbox_dir/voice_trans/speech_campplus_sv_zh-cn_16k-common",
device='cuda:2'
)

start_time = time.time()

res = model.generate(
input=wav_file,
batch_size_s=300,
batch_size=1
)


Why is it reported wrong? Please help me check it.


File "/root/anaconda3/lib/python3.12/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 71, in
cli.main()
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
run()
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
runpy.run_path(target, run_name="main")
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
File "/root/.vscode-server/extensions/ms-python.debugpy-2024.12.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
File "/mnt/data/toolbox_dir/voice_trans/test.py", line 25, in
res = model.generate(
^^^^^^^^^^^^^^^
File "/mnt/data/toolbox_dir/voice_trans/venv/lib/python3.12/site-packages/funasr/auto/auto_model.py", line 304, in generate
return self.inference_with_vad(input, input_len=input_len, **cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/data/toolbox_dir/voice_trans/venv/lib/python3.12/site-packages/funasr/auto/auto_model.py", line 554, in inference_with_vad
sv_output = postprocess(all_segments, None, labels, spk_embedding.cpu())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/data/toolbox_dir/voice_trans/venv/lib/python3.12/site-packages/funasr/models/campplus/utils.py", line 117, in postprocess
assert len(segments) == len(labels)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
0%| | 0/1 [00:46<?, ?it/s]

@MJ666-K MJ666-K added the question Further information is requested label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant