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

Input values to Lexicon decoder.decode. Decoding causes segmentation fault (core dumped) #882

Closed
knightrogen opened this issue May 27, 2022 · 5 comments
Labels
question Further information is requested

Comments

@knightrogen
Copy link

I have setuped flashlight and kenlm , also have exported the kenlm_root path before building the flashlight.

I am able to create lexicondecoder option object, kenlm object, lexicondecoder object. But as the values are passed to lexicondecoder.decode it shows segmentation fault core dumped. The error is showed after reading lm.arpa .

Is this error coming from the type of input I am giving to decoder or is it some kenlm issue.

Currently I am passing input array.ctypes.data and T,N = shape of array.

@knightrogen knightrogen added the question Further information is requested label May 27, 2022
@jacobkahn
Copy link
Member

@knightrogen are you using the Python bindings or the C++ API?

Also, Flashlight Text has moved to https://github.com/flashlight/text — you might consider rebuilding using that codebase as well if you aren't dependent on Flashlight.

@kamirdin
Copy link

kamirdin commented Jun 7, 2022

@jacobkahn Hi, I encounter the same issue, I'm willing to try the new codebase, but a lot of code here do dependent on Flashlight:
https://github.com/facebookresearch/fairseq/blob/main/examples/speech_recognition/w2l_decoder.py
at line 136:
self.lm = KenLM(args.kenlm_model, self.word_dict)
got a (core dumped) error, any thought about it ?thank you

@jacobkahn
Copy link
Member

Hi @kamirdin — do you have KenLM installed on your system? It's possible it's not found at runtime.

@kamirdin
Copy link

kamirdin commented Jun 7, 2022

@jacobkahn thanks for your response! I do have installed KenLM and set ‘export KENLM_ROOT=$mypath’ during python setup.py install .
Do I need to set something intentionally at runtime?

@jacobkahn
Copy link
Member

jacobkahn commented Jun 20, 2022

@kamirdin If this is happening with the fairseq KenLM abstraction, I'd suggest opening an issue there. If you've installed KenLM and the bindings build has properly found them, you're doing everything right on the Flashlight side.

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

3 participants