Skip to content

paddlespeech asr ... KeyError: 'ASRExecutor' #4127

@jeffersonchua

Description

@jeffersonchua

paddlespeech asr --lang zh --input zh.wav

Traceback (most recent call last):
File "/v6/paddleGPU/venv/bin/paddlespeech", line 7, in
sys.exit(_execute())
~~~~~~~~^^
File "/v6/paddleGPU/venv/lib/python3.13/site-packages/paddlespeech/cli/entry.py", line 41, in _execute
com['_entry'] = locals()[cls]
~~~~~~~~^^^^^
KeyError: 'ASRExecutor'

python

Python 3.13.7 (main, Sep 9 2025, 03:40:15) [GCC 12.5.0] on linux

from paddlespeech.cli.asr.infer import ASRExecutor
... asr = ASRExecutor()
... result = asr(audio_file="zh.wav", lang="zh")
...
Traceback (most recent call last):
File "", line 3, in
result = asr(audio_file="zh.wav", lang="zh")
File "/v6/paddleGPU/venv/lib/python3.13/site-packages/paddlespeech/cli/utils.py", line 328, in _warpper
return executor_func(self, *args, **kwargs)
File "/v6/paddleGPU/venv/lib/python3.13/site-packages/paddlespeech/cli/asr/infer.py", line 502, in call
self._init_from_path(model, lang, codeswitch, sample_rate, config,
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
decode_method, num_decoding_left_chunks, ckpt_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/v6/paddleGPU/venv/lib/python3.13/site-packages/paddlespeech/cli/asr/infer.py", line 159, in _init_from_path
self.task_resource.set_task_model(tag, version=None)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/v6/paddleGPU/venv/lib/python3.13/site-packages/paddlespeech/resource/resource.py", line 74, in set_task_model
assert model_tag in self.pretrained_models,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Can't find "conformer_u2pp_online_wenetspeech-zh-16k" in resource. Model name must be one of []

I've compile paddlepaddle from git with paddlepaddle_gpu-0.0.0-cp313-cp313-linux_x86_64.whl using
cuda_12.9.1_575.57.08_linux.run and cudnn-linux-x86_64-9.13.0.50_cuda12-archive.tar.xz

paddleocr works great. But I couldn't get paddlespeech to work.

According to the doc, it should automatically download onformer_u2pp_online_wenetspeech-zh-16k but it doesn't seem to do that.

Please help.

Thank you,
Jeff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions