Skip to content

ASR 语音转文字 list index out of range #4046

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

Open
easylolicon opened this issue Apr 3, 2025 · 1 comment
Open

ASR 语音转文字 list index out of range #4046

easylolicon opened this issue Apr 3, 2025 · 1 comment
Assignees

Comments

@easylolicon
Copy link

错误信息如下。

ERROR] - list index out of range
Traceback (most recent call last):
File "/Users/lolicon/.conda/envs/duoduo-speech/lib/python3.9/site-packages/paddlespeech/cli/asr/infer.py", line 314, in infer
result_transcripts = self.model.decode(
File "/Users/lolicon/.conda/envs/duoduo-speech/lib/python3.9/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Users/lolicon/.conda/envs/duoduo-speech/lib/python3.9/site-packages/paddle/base/dygraph/base.py", line 400, in _decorate_function
return func(*args, **kwargs)
File "/Users/lolicon/.conda/envs/duoduo-speech/lib/python3.9/site-packages/paddlespeech/s2t/models/u2/u2.py", line 818, in decode
hyp = self.attention_rescoring(
File "/Users/lolicon/.conda/envs/duoduo-speech/lib/python3.9/site-packages/paddlespeech/s2t/models/u2/u2.py", line 532, in attention_rescoring
assert speech.shape[0] == speech_lengths.shape[0]
IndexError: list index out of range

代码如下。

asr = ASRExecutor()
result = asr(audio_file=Path(audio_path), model='conformer_online_wenetspeech', force_yes=True)
print(result)

环境信息如下。

pip list
Package Version


absl-py 2.2.1
aiohappyeyeballs 2.6.1
aiohttp 3.11.16
aiosignal 1.3.2
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.6.2
astor 0.8.1
asttokens 3.0.0
async-timeout 5.0.1
attrs 25.3.0
audioread 3.0.1
babel 2.17.0
bce-python-sdk 0.9.29
blinker 1.9.0
bokeh 3.4.3
boltons 25.0.0
Bottleneck 1.4.2
braceexpand 0.1.7
certifi 2025.1.31
cffi 1.17.1
charset-normalizer 3.4.1
click 8.1.8
colorama 0.4.6
coloredlogs 15.0.1
colorlog 6.9.0
contourpy 1.3.0
cycler 0.12.1
datasets 3.5.0
decorator 5.1.1
dill 0.3.4
Distance 0.1.3
dnspython 2.7.0
editdistance 0.8.1
einops 0.8.1
email_validator 2.2.0
exceptiongroup 1.2.0
executing 2.2.0
fastapi 0.115.12
fastapi-cli 0.0.7
filelock 3.18.0
Flask 3.1.0
flask-babel 4.0.0
flatbuffers 25.2.10
fonttools 4.56.0
frozenlist 1.5.0
fsspec 2024.12.0
ftfy 6.3.1
future 1.0.0
g2p-en 2.1.0
g2pM 0.1.2.5
h11 0.14.0
h5py 3.13.0
httpcore 1.0.2
httptools 0.6.4
httpx 0.27.0
huggingface-hub 0.30.1
humanfriendly 10.0
HyperPyYAML 1.2.2
idna 3.7
importlib_metadata 8.6.1
importlib_resources 6.5.2
inflect 7.0.0
intervaltree 3.1.0
ipython 8.18.1
itsdangerous 2.2.0
jedi 0.19.2
jieba 0.42.1
Jinja2 3.1.6
joblib 1.4.2
jsonlines 4.0.0
kaldiio 2.18.1
kiwisolver 1.4.7
librosa 0.8.1
llvmlite 0.43.0
loguru 0.7.3
lxml 5.3.1
markdown-it-py 3.0.0
MarkupSafe 3.0.2
matplotlib 3.9.4
matplotlib-inline 0.1.7
mdurl 0.1.2
mido 1.3.3
mock 5.2.0
mpmath 1.3.0
multidict 6.2.0
multiprocess 0.70.12.2
nara-wpe 0.0.11
networkx 3.2.1
nltk 3.9.1
note-seq 0.0.3
numba 0.60.0
numpy 1.23.5
omegaconf 2.3.0
onnx 1.17.0
onnxruntime 1.19.2
OpenCC 1.1.9
opencc-python-reimplemented 0.1.7
opencv-python 4.6.0.66
opt-einsum 3.3.0
packaging 24.2
paddle2onnx 1.3.1
paddleaudio 1.1.0
paddlefsl 1.1.0
paddlenlp 2.6.1
paddlepaddle 3.0.0
paddlesde 0.2.5
paddleslim 2.6.0
paddlespeech 1.4.1
paddlespeech-feat 0.1.0
pandas 2.2.3
parameterized 0.9.0
parso 0.8.4
pathos 0.2.8
pattern_singleton 1.2.0
pexpect 4.9.0
pillow 11.1.0
pip 25.0
platformdirs 4.3.7
pooch 1.8.2
portalocker 3.1.1
pox 0.3.5
ppdiffusers 0.19.4
ppft 1.7.6.9
praatio 5.1.1
pretty_midi 0.2.10
prettytable 3.16.0
prompt_toolkit 3.0.50
propcache 0.3.1
protobuf 3.20.2
psutil 7.0.0
ptyprocess 0.7.0
pure_eval 0.2.3
pyarrow 19.0.1
pybind11 2.13.6
pycparser 2.22
pycryptodome 3.22.0
pydantic 2.11.1
pydantic_core 2.33.0
pydub 0.25.1
Pygments 2.19.1
pyparsing 3.2.3
pypinyin 0.44.0
pypinyin-dict 0.9.0
python-dateutil 2.9.0.post0
python-dotenv 1.1.0
python-multipart 0.0.20
pytz 2025.2
pyworld 0.3.5
PyYAML 6.0.2
pyzmq 26.3.0
rarfile 4.2
regex 2024.11.6
requests 2.32.3
requests-mock 1.12.1
resampy 0.4.3
rich 14.0.0
rich-toolkit 0.14.1
ruamel.yaml 0.18.10
ruamel.yaml.clib 0.2.12
sacrebleu 2.5.1
safetensors 0.5.3
scikit-learn 1.6.1
scipy 1.13.1
sentencepiece 0.2.0
seqeval 1.2.2
setuptools 75.8.0
shellingham 1.5.4
six 1.17.0
sniffio 1.3.0
sortedcontainers 2.4.0
soundfile 0.13.1
stack-data 0.6.3
starlette 0.46.1
swig 4.3.0
sympy 1.13.3
tabulate 0.9.0
TextGrid 1.6.1
threadpoolctl 3.6.0
timer 0.3.0
ToJyutping 3.2.0
tornado 6.4.2
tqdm 4.67.1
traitlets 5.14.3
trampoline 0.1.2
typeguard 2.13.3
typer 0.15.2
typing_extensions 4.12.2
typing-inspection 0.4.0
tzdata 2025.2
urllib3 1.26.20
uvicorn 0.34.0
uvloop 0.21.0
visualdl 2.5.3
watchfiles 1.0.4
wcwidth 0.2.13
webrtcvad 2.0.10
websockets 15.0.1
Werkzeug 3.1.3
wheel 0.45.1
xxhash 3.5.0
xyzservices 2025.1.0
yacs 0.1.8
yarl 1.18.3
zhon 2.1.1
zipp 3.21.0

@zxcd
Copy link
Collaborator

zxcd commented Apr 7, 2025

pls try to use paddlespeech==develop when you are using paddlepaddle>2.5.1

@zxcd zxcd self-assigned this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants