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

"indices element out of data bounds" while inferencing #63

Open
jinggaizi opened this issue Nov 15, 2022 · 1 comment
Open

"indices element out of data bounds" while inferencing #63

jinggaizi opened this issue Nov 15, 2022 · 1 comment

Comments

@jinggaizi
Copy link

hi ,
i try to inference wav as the document
"import librosa
from espnet_onnx import Speech2Text
speech2text = Speech2Text(tag_name='')
y, sr = librosa.load('sample.wav', sr=16000)
nbest = speech2text(y)"
but when run "nbest = speech2text(y)" , occur a error like
"onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running Gather node. Name:'Gather_4' Status Message: indices element out of data bounds, idx=525 must be within the inclusive range [-512,511]"
my feats_lengths is 526, why this error occurs

@Masao-Someki
Copy link
Collaborator

Hi @jinggaizi , you can set max_seq_len operation as the following:

from espnet_onnx.export import ASRModelExport

m = ASRModelExport()
m.set_export_config(
    max_seq_len=1024
)
m.export_from_pretrained(...)

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