You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having some trouble updating my old keyphrase search implementation to work with PocketSphinx5. I applied the changes mentioned in the FAQ such as swapping 'ps_set_search' -> 'ps_activate_search' and swapping 'ps_set_keyphrase' -> 'ps_add_keyphrase' but both functions always seem to return < 0. I even tried using the ps_add_kws and passing in a path to a keyphrases.list file that contains the keyphrases needed to be detected but both methods seem to fail. Is there any more info or examples that can be offered on how to use the search API as the documentation around it is very minimal with no examples. Thanks!
Here is the mentioned keyphrases.list file and the dictionary im using (both changed to .txt so they could be uploaded here) keyphrases.txt cmudict-en-us.txt
Hi! Yes, I think there is lacking documentation there indeed. There is something of an example in the unit tests (both in C and Python) but it needs to be brought into the actual documentation:
Activity
roccopersico99 commentedon Oct 17, 2022
Here is the mentioned keyphrases.list file and the dictionary im using (both changed to .txt so they could be uploaded here)
keyphrases.txt
cmudict-en-us.txt
roccopersico99 commentedon Oct 17, 2022
I think the issue more boils down to needing an example of using the Keyword mode in general, as live.c and simple.c do not use this mode.
dhdaines commentedon Oct 19, 2022
Hi! Yes, I think there is lacking documentation there indeed. There is something of an example in the unit tests (both in C and Python) but it needs to be brought into the actual documentation:
https://github.com/cmusphinx/pocketsphinx/blob/master/test/unit/test_keyphrase.c
https://github.com/cmusphinx/pocketsphinx/blob/master/cython/test/kws_test.py
This also doesn't really describe the API for doing it other than from a file.