I'm using pocketsphinx 0.7 with python and I'm able to get the lmset via:
lmSet = decoder.get_lmset() and I've read a previous thread which mentioned
tests/unit/test_lm_read.c as an example.
Looking at this code, it's very clear how to do this in C, but I looked at
both the pocketsphinx and sphinxbase python modules and couldn't find any
functions/methods which allow adding a lm to the lmset, selecting one from the
set, or updating the lmset.
Is this due to python bindings not giving full coverage to the lmset stuff, or
am I looking in the wrong place?
-Scott
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is this due to python bindings not giving full coverage to the lmset stuff,
or am I looking in the wrong place?
This part is missing in bindings, not implemented yet. Patch is welcome. It
might be easier to implement python bindings through swig, not through pyx.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just noticed that at least some of the required C functions were included in
the .pxd files but weren't used in the .pyx files. Any particular reason why
swig might be easier?
-Scott
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've added the necessary code to both the pocketsphinx and sphinxbase cython
bindings yesterday, and it seemed to work. I just need to do some more testing
before I send you some patches. I have some experience with swig, although not
recently, but I needed to get this stuff working asap for my job, which is why
I went the cython route.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using pocketsphinx 0.7 with python and I'm able to get the lmset via:
lmSet = decoder.get_lmset() and I've read a previous thread which mentioned
tests/unit/test_lm_read.c as an example.
Looking at this code, it's very clear how to do this in C, but I looked at
both the pocketsphinx and sphinxbase python modules and couldn't find any
functions/methods which allow adding a lm to the lmset, selecting one from the
set, or updating the lmset.
Is this due to python bindings not giving full coverage to the lmset stuff, or
am I looking in the wrong place?
-Scott
This part is missing in bindings, not implemented yet. Patch is welcome. It
might be easier to implement python bindings through swig, not through pyx.
thanks for the quick reply!
I just noticed that at least some of the required C functions were included in
the .pxd files but weren't used in the .pyx files. Any particular reason why
swig might be easier?
-Scott
Swig is preferred because it can be used for Java bindings which we need for
Android ;) But we don't have Python swig infrastructure yet.
I've added the necessary code to both the pocketsphinx and sphinxbase cython
bindings yesterday, and it seemed to work. I just need to do some more testing
before I send you some patches. I have some experience with swig, although not
recently, but I needed to get this stuff working asap for my job, which is why
I went the cython route.
This thing has been committed. Thanks a lot!