N-Best support for pocketsphinx Android! -
i have research project in need n-best support in pocketsphinx android. using swig command line tool generate pocketsphinx_wrap.c , , ndk-build generate shared library android. problem writing n-best content required in pocketsphinx.i. can 1 please advise or guide me how write function in pocketsphinx.i?
you don't write function write wrapper, it's different thing. discussed in forum thread here:
https://sourceforge.net/projects/cmusphinx/forums/forum/5471/topic/4566470
the wrapper should this:
typedef struct ps_nbest_s nbest; typedef struct ps_nbest_t { } nbest; %extend nbest { nbest(decoder *d) { nbest *nbest = ps_nbest(d, 0, -1, null, null); return nbest; } ~nbest() { ps_nbest_free($self); } void next() { ps_nbest_next($self); } hypothesis* hyp() { const char* hyp; int32 score; hyp = ps_nbest_hyp($self, &score); return new_hypothesis(hyp, "", score); } };
Comments
Post a Comment